|
hi,
i'm actually using a second winform ("info-form") to show some information after the user clicks on a picturebox.
if i click more than once, several "info-form" will show. i'd like to update the info showed in the "info-form" if it exists instead of creating new ones.
moreover, the info-form topmost option to true and i would like to get it topmost only when my app is active, but this is not really important.
any advice?
thancks in advance
Cheers!
Paolo
|
|
|
|
|
Are you working with an MDI application? Or two completely separate forms?
|
|
|
|
|
thanks for answering me,
it's a SDI application,
actually i can manage this issue declaring the name of the second form and verifying if Info_Form "is nothing" or if "Info_Form.IsDisposed" and then creating it.
do you think it's correct?
thanks again!
|
|
|
|
|
|
i took a look at the article you linked to, very interesting.
thanks once again!
Cheers!
Paolo
|
|
|
|
|
I wrote a VB.NET program and I want to run report as follow :
When users click on the "Run report" button, the crystal report will open.
code:
shell("crw32.exe /r .\crystalReport1.rpt /id=1 /run",AppWinStyle.NormalFocus)
but the program justopens the report in design mode.
Now I want the report will be opened directly with the parameters id=1 ( not in design mode) when users click on the "Run Report" button.
Hung
|
|
|
|
|
Does anyone know how to create a textbox in the toolbar
like google search tool with VB6?
I am also interested in the
Shin
|
|
|
|
|
I just googled and found out that i need to use band object.
If some has seen the sample code let me know
Thanks
Shin
|
|
|
|
|
There's an article here on CP[^]
But it's in C#, not VB6. Maybe it can help you with some ideas or something?
Hope this helps!
|
|
|
|
|
Thanks,
I will have a look at it.
Do you happen to know how to create some of application
docked on the top of desktop and hide/show depending on
how close the mouse pointer from the application?
Shin
|
|
|
|
|
I'm afraid not
I was just reading your post and remembered the article, but i don't know how the stuff in the article works. I just vagely read it, but didn't do anything with it.
Sorry i can't help you any further...
|
|
|
|
|
How to find that, the installed application is installed with the option everyone or just for me (.msi file). Identify programatically the user selected option (everyone/just for me) in Installation to decide copying of data files to userpath or commondata path (eg. user logged in profile path or commondata folder)
|
|
|
|
|
Achieving what you describe is very difficult. You would have to checkl the property, then run a custom action (a C++ dll, not an installer class) that modified the msi database itself to change the target folder for the files. A much simpler approach would be to simple disable the option, always install for all users, and just fix the target folder as commondata.
Either way you'll have to download the Windows Installer SDK and modify the setup msi with the editing tool Orca. It's too complicated to attempt to explain. You'll have to spend considerable time studying the table design of an MSI.
Robert
|
|
|
|
|
hi.
i am trying to make connection between a vb.net desktop application with the samba (linux server). my application reads files from linux server. but this it happends if i manullay go to start->run->"\\192.0.0.20" and when login password screen pop up i provide it the details, and then i can reads files from my applicatoin with out any authentication, else i just get the exception,
can any one help me how can i provide the login and password to remote ip from my application.
i am working in vb.net. please refer free api (no trial ver, or traing api)
regards.
kaleemullah
(Software engineer)
kaleem_khan2001@yahoo.com
kaleem.khan2001@gmail.com
|
|
|
|
|
Hello, can somebody tell me how to read from a textfile from line number 4?? PLEASE SEND ME FEEDBACK ON THIS!! THANKS!!
|
|
|
|
|
Sorry for the C++ answer....
Are you using VB.NET or VB6 ? VB.NET has an excellent class library, including classes for text files, which allow you to read line by line ( so you can keep line 4 ). VB6 kind of sucks, I don't know what you'd do there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am using vb.net? what statement can i make??
|
|
|
|
|
Given your comments below, your solution is fragile. What you should do is build a hashtable of names to full address details, so when the user clicks on a name, you look it up in the hashtable. What if someone changes the file while your exe is open ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
In VB6 use
fnum = FreeFile
Open strfile for Input As #1
strfile = Input$(LOF(fnum, #1)
search from the net.
|
|
|
|
|
hello, i am using vb.net and i am making an address book. i want to search a specific line from the textfile. Example if i want to see Adrian's details i can go to Adrian from a listbox and click a button on to it. it then appears another form with all the details of Adrian. Adrian is in the 4rth line of the textfile and i want to bring out Adrians details onto the form. How can i make this in vb.net??
|
|
|
|
|
Hi all,
I am using the following line to print a file in my VB .NET app.
Shell("Notepad.exe /p " & lsFile, AppWinStyle.Hide)
This way I don't have to worry about drawing out a PrintDocument and wordwrap is handled for me by Notepad.
I was wondering if there is a way of invoking the Print Dialog for Notepad through a command line argument? Or someway of passing the printer name to the Notepad command line argument /pt filename printer ?
Any suggestions? Thanks
|
|
|
|
|
I think the command lines for Notepad looks like this so:
/P <filename> print filename
/PT <filename> <printername> <driverdll> <port>
somthing like this:
Shell("Notepad.exe /PT " & lsFile & " <printername> <driverdll> <port>", AppWinStyle.Hide)
MSDN: Pathname
Required. String. Name of the program to execute, together with any required arguments and command-line switches. Pathname can also include the drive and the directory path or folder.
Http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctshell.asp
|
|
|
|
|
I'm still looking around for an answer, but do you know if the driverdll and port are required as a command line argument?
Also, is there some way to get that information from the PrintDialog control in VB.NET?
All I could find in the properties is: PrintDialog1.PrinterSettings.PrinterName
But that doesn't pass to the command line properly...or perhaps I am doing something wrong?
|
|
|
|
|
The printer name is exactly how it is shown in the printers and faxes control panel under properties for the printer settings.
example: mine is "EPSON Stylus Photo 785EPX"
Run this from the command line in a dos window and it will give you the rest of the info you need:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /Xg /n "<put your printer name here>"
|
|
|
|
|
Ok, Anonymous I think I got it now,
to use the /pt switch everthing must be in quotes(") past the switch.
Here's how i got it to work:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim lsFile As String = "NotePad.exe /pt " & """c:\results.txt""" & """Okidata ML 320 Turbo/D (IBM)""" & """LPT1:"""
Debug.WriteLine(lsFile)
Shell(lsFile, AppWinStyle.NormalFocus)
End Sub
|
|
|
|