|
Hi,
Sorry but I don't know ur name. First I would like to thank u for ur quik response.But I would b requiring some more help.Plz help.
I would like to know in wich ini file should I save the database path,Will I need to give additional attributes of the database like USERID,PASSWORD,LOCKTYPE in that file, and How should I execute that file from the application?
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
You can create your own ini file. Example appliationName.ini. I would place this file in the same directory as your executable.
As far as placing the user name and password in this file, I don't recommend it (unless you perform some kind of encryption on the password).
Are you using one user id to connect to your database or will everyone that logs in have a different user name and password? What kind of database are you trying to connect to?
As for reading and writing to an ini file look at the following link or do a search on google
http://www.vbcity.com/forums/topic.asp?tid=20423
|
|
|
|
|
Dear all
I need your favor due to my case, I wondering know how to write Select Command with two condition. here is I give you my description about my need in my form there in two textbox (textbox1 and textbox2) could you tell me how to write the Select command to involved both of that Textbox using "And" ?, so far I only know one condition for select command as the follow word"
" Select * from table1 where (idno='" & textbox1.text & "')",conection)
and now I need to combine select command for access textbox1 and textbox2 value.
Thank you
Best regards
ICE
|
|
|
|
|
"Select * from table1 where (idno='" & textbox1.text & "' and idno='" & textbox2.text & "')",
nave
|
|
|
|
|
Need some direction; through vb.net can you use DDE links directly? I know that they are used in Excel. Where can I go to get information on working with FIX/API? Can you use Active-X controls in vb.net? Just a web site or book. Thank You
|
|
|
|
|
machman1 wrote: through vb.net can you use DDE links directly
No. There is no support for DDE in the .NET Framework. YOu'll have to P/Invoke the appropriate Win32 functions to use DDE.
machman1 wrote: Where can I go to get information on working with FIX/API
Google search results[^].
machman1 wrote: Can you use Active-X controls in vb.net
Yes. Just add it to the ToolBox. Right click in the ToolBox, then pick Add/Remove Items... Find your ActiveX control on the COM tab and you'll be all set to drop it on your form.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi.
is there anyway I can track when user opens a file? I don't need to know creation, modification, and deletion because I'm already using FileSystemWatcher for that. I used LastAccess filter but it seems doesn't work or maybe it does but I cannot see it. All I need to know that user opened the file and let's say reads it.
My program writes all events to the flat file so I can see all events raised.
Thank you in advanced.
Alex.
-- modified at 16:17 Friday 21st April, 2006
|
|
|
|
|
There is no event for this. You'd have to hook the file system, just like FileMon does.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
g = Graphics.FromImage(bmp)
g.TranslateTransform(pb.Width / 2, pb.Height / 2)
g.DrawEllipse(New Pen(color.MediumTurquoise, 1), 0, 0, 2, 2)
g.DrawRectangle(New Pen(color.FromArgb(0, 0, 0)), 0, 0, 100, 100)
g.DrawEllipse(New Pen(Color.Red, 1), 0, 0, 100, 100)
cntnr = g.BeginContainer(rect1, rect2, GraphicsUnit.Pixel)
g.TranslateTransform(20, 20)
g.Clear(BackColor)
g.DrawRectangle(New Pen(Color.FromArgb(255, 255, 255)), 0, 0, 100, 100)
g.EndContainer(cntnr)
g.DrawLine(New Pen(Color.Blue, 1), 0, 0, 200, 200)
I am confused by losing all of my scratches before the "BeginContainer" because of the "Clear(BackColor)",why?
tczhang
|
|
|
|
|
Hi,
Ich suche nun schon eine längere Zeit, um den aktiven Node eines Windows Clusters auszulesen. Ein Scope zum WMI Objekt konnte ich öffnen, nur kann ich die entsprechenden Informationen nicht auslesen.
Dim clustName As New String("myCluster")
Dim clustGrpRes As New String("myResGrp")
Dim conOpt As New ConnectionOptions
conOpt.Username = "domain\myUsrName"
conOpt.Password = "myPassword"
Dim mgmScope As ManagementScope
Dim mgmPath As ManagementPath
Dim mgmObj As ManagementObject
mgmScope = New ManagementScope("\\" & clustName & "\root\mscluster", conOpt)
mgmPath = New ManagementPath("MSCluster_ResourceGroup.Name='" & clustGrpRes & "'")
mgmObj = New ManagementObject(mgmScope, mgmPath, Nothing)
OS auf dem die Applikation ausgeführt wird: Windows Server 2k3 Standard Edition
OS des Clusters: Win Server 2k3 Enterprise Edition
Kennst Du eine Möglichkeit, wie ich an die benötigten Informationen gelange?
Danke für Deine Bemühungen
gr33z
david
saw heaven and hell were lies,
when I'm god everyone dies
|
|
|
|
|
You do realize this is an English speaking board, right?
Babel fished:
----------------------------8<----------------------------
I look for a longer time now already, in order to select the active Node of a Windows cluster. A Scope to the WMI I could open object, only I cannot pick the appropriate information out.
Dim clustName As New String("myCluster")
Dim clustGrpRes As New String("myResGrp")
Dim conOpt As New ConnectionOptions
conOpt.Username = "domain\myUsrName"
conOpt.Password = "myPassword"
Dim mgmScope As ManagementScope
Dim mgmPath As ManagementPath
Dim mgmObj As ManagementObject
mgmScope = New ManagementScope("\\" & clustName & "\root\mscluster", conOpt)
mgmPath = New ManagementPath("MSCluster_ResourceGroup.Name='" & clustGrpRes & "'")
mgmObj = New ManagementObject(mgmScope, mgmPath, Nothing)
OS on that is implemented the application: Windows Server 2k3 Standard Edition
OS of the cluster: Win Server 2k3 Enterprise Edition
Do you know a possibility, how I arrive at the necessary information?
Thanks for your efforts
----------------------------8<----------------------------
I don't have a cluster to test on but you might be looking to execute a WMI query like:
SELECT Status From MSCluster_ResourceGroup WHERE Name='clusterGroup'
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
In an MDI program, how can I share a variable across all the forms that make up the MDI. ie. form1 sets user name, but form2 uses user name to set location. I am using VB 2003.
|
|
|
|
|
Easiest way is to add Module as we do in vb6 and declare your variables there.
|
|
|
|
|
Better way. Create a class that holds your "global" variables and declare them Public Shared.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave, congrats on the MVP nod.
just a quick related question. i've read in places that declaring public properties in your forms is bad practice. i read this after having already implemented this in an mdi project of my own. any idea on why this technique is a bad idea? this is actually how i implement the above situation i.e. our user logs into the application then i expose a "User" property from my main form for use throughout the application. i've never had any problems with this technique and was just curious.
-jim
-- modified at 10:21 Friday 21st April, 2006
|
|
|
|
|
It is always a good idea to separate your GUI from your business objects (in this case user would be one). Think OOP it gives you more flexibility.
Think if you had a project that was done in windows forms and you got a new requirement to create a web front end. If you create global variables in your forms you will have to duplicate this logic in your web page. If this was a class in an external dll (which all business objects should be in a separate project) , all you would have to do is reference the dll in the web project and the functonality is there.
Hope this helps.
Mike Lasseter
|
|
|
|
|
Thanks!
Mr's right, at least as far as I can figure out. I've never seen any documentation that says, definitively, that it's bad practice. Just, like here, everyone saying it's taboo. The most reasonable explanation that I could come up with was business logic.
Keep the form-related, visual UI stuff, in the form code and the application logic in seperate classes. This would include "global" variables that you need to share between MDI documents. I've always just created a class or two that did nothing but hold my "global" stuff, complete with Property wrappers. It actually makes it easier to track whats going on too. You don't have to go to multiple forms to find out "where on earth did I declare this crap!?"
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 11:37 Friday 21st April, 2006
|
|
|
|
|
I had written some fairly decent code in VB.NET 2003 to print out a listing of my video and recipe collections. Multiple pages, columns, small pictures etc. I imported the VB2003 programs into VB Express and although the main body of the programs worked quite well, the print routines just FROZE up everything. There were no compiling errors or runtime errors. I had to Cntl/Alt/Del to unlock everything. Any ideas of what is wrong?
Thanks
|
|
|
|
|
Put a breakpoint at the start of the Printpage() event and trace through until it freezes?
Or but trace.writeline code in the app to see what is going on?
(Without looking at the code I can't be any more helpful, sorry)
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
I wanted to run multiple files in media player from the vb.net code. So can anyone suggest me how can I solve this problem.
|
|
|
|
|
Create a PlayList[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi,
I have developed a VB.net project in 800 X 600 resolution.
Now i deployed in a computer which is having 1024 x 768 Resolution.
It is not covering whole screen and looking bad.
any process by which it will adjust automatically....by the screen resolution.
cheers
Paritosh
|
|
|
|
|
Nope. You have to resize your form to fit, if needed. You're form also has to be designed to compensate for varying sizes. This means anchoring controls so they stay in the spots you want them and can resize themselves accordingly. Check out the Archor property, among othet things, of just about every visual control in your form.
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 9:00 Friday 21st April, 2006
|
|
|
|
|
What is the way to check for EndOfStream while using a Binary Reader ? StreamReader has the EndOfStream Property, but there seems to be no equivalent Property in BinaryReader. I am using BinaryReader because I am dealing with Byte Arrays, and sadly, StreamReader seems to insit on reading Character Arrays. And, the Stream I am reading doesn't support Seeking, so we cannot check if the Position Property is equal to the Length...
I googled for it, but can't seem to find anything. Any help people ?
Yuvi Panda T
Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
|
|
|
|