|
查看: 1467|回复: 13
|
vb.net maximize windows问题,7楼
[复制链接]
|
|
|
本帖最后由 1234_4321 于 23-12-2009 09:20 PM 编辑
7楼,如何做到?谢谢
==========================================================
请问如何做到?
我这里开dataset都是用relative path的,例如"C:/My Document/Desktop/Database"
所以每次move 我的program去pendrive再放到别的电脑时很麻烦,全部dataset要connect过..
请问如何做到absolute path?
我的意思是说例如"../../Database"
谢谢.. |
|
|
|
|
|
|
|
|
|
|
发表于 17-12-2009 05:06 PM
|
显示全部楼层
本帖最后由 山野草夫 于 17-12-2009 05:08 PM 编辑
把 db connectionstring 放在 app.config 里。
比如说:
<add key="conn" value="Provider=Microsoft.jet.oledb.4.0;data source= |datadirectory|\xxx\xxx\db1.mdb;User Id=xxx; password=;" /> |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 17-12-2009 07:29 PM
|
显示全部楼层
把 db connectionstring 放在 app.config 里。
比如说:
山野草夫 发表于 17-12-2009 05:06 PM 
对了,想问其实app.config是拿来做什么的?
store connection string 起来而已? |
|
|
|
|
|
|
|
|
|
|
发表于 18-12-2009 03:18 PM
|
显示全部楼层
app.config的好处是,你可以无需重新编写coding,就可以更该相关的value。
当然除了store connection string之外,也可以store其他的value。 |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 18-12-2009 03:58 PM
|
显示全部楼层
app.config的好处是,你可以无需重新编写coding,就可以更该相关的value。
当然除了store connection st ...
山野草夫 发表于 18-12-2009 03:18 PM 
除了connection string还有什么呢?
可以给几个例子看看吗?
我只看到connection string而已哦 |
|
|
|
|
|
|
|
|
|
|
发表于 22-12-2009 12:31 AM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 23-12-2009 09:19 PM
|
显示全部楼层

想问,如果我maximize windows,
要如何让我的button全部都跟着screen ratio走?
之前看过人家说
建一个PANEL,
把你的textbox/label/combo/datagrid 排好....
DOCK 时DOCK 整个PANEL...
不过好像不能酱。。
还有我们做windows form时,要怎样啦给它的size default是maximize? |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 30-12-2009 08:34 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 1-1-2010 12:29 PM
|
显示全部楼层
想问,如果我maximize windows,
不过好像不能酱。。
还有我们做windows form时,要怎样啦给它的size default是maximize?
1234_4321 发表于 23-12-2009 09:19 PM 
windows form properties那邊, window state選maximize
或者
Me.WindowState = FormWindowState.Maximized |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 1-1-2010 01:37 PM
|
显示全部楼层
windows form properties那邊, window state選maximize
或者
Me.WindowState = FormWindowState.Ma ...
mdw1121686 发表于 1-1-2010 12:29 PM 
这个我懂,可是全部form的item跑到完了。。
以前学html时,有学到用percentage的,就是说不管user的screen resolution怎样,
我的form他们看到还是会跟着percentage走,就是说screen width的50%是image之类的 |
|
|
|
|
|
|
|
|
|
|
发表于 3-1-2010 04:27 PM
|
显示全部楼层
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
请努力爬google, 你的问题很简单,随便去google都找的到 |
|
|
|
|
|
|
|
|
|
|
发表于 4-1-2010 04:22 PM
|
显示全部楼层
|
Using DOCK & ANCHOR to positioning and Resize the button. So easy to learn...online can find many sample..no need writing long long code to do it.... |
|
|
|
|
|
|
|
|
|
|
发表于 4-1-2010 04:24 PM
|
显示全部楼层
|
previously vb6.0 it need to write out back end coding to do resizing and positioning. for vb.net is no need |
|
|
|
|
|
|
|
|
|
|
发表于 4-1-2010 07:54 PM
|
显示全部楼层
previously vb6.0 it need to write out back end coding to do resizing and positioning. for vb.net is ...
kkwpms99 发表于 4-1-2010 04:24 PM 
use 中文啦.... |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|