|
I have the following code in a vb script to open the cd-rom drives:
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If
But, how do I close the cd-rom drive?
|
|
|
|
|
|
Hi,
I am developing a Visual Basic Project that takes a lot of data from a DB and generates an Excel Chart. Then, I have to save the chart in HTML format, because the chart is viewed in a web page. I have to put a background color accordying to the web site style. But Excel don't accept the background color that I need to fix. It seems that color palette in Excel is limited to few colors. I tried also with a background picture, but it covers only the chart area, and the HTML generated code creates an image for the chart and the body background color remains white...
Anybody knows how can I resolve this problem?
Thanks in advance,
LAURA
|
|
|
|
|
OK, i have this mp3 renaming tool written in VB and I've added a context menu item for mp3 files called "MP3Rename". When I right click on an mp3 file and choose MP3Rename from the context menu, it runs my program in the background to rename the mp3 file. This worls perfectly when I select one file, but if I select multiple files, my program doesn't even get executed. I know this because I've placed a MsgBox statement on the first line of my code, but the message box never appears with multiple files (it does with a single file). Anyone have any ideas why selecting multiple files does absolutely nothing? Thanks.
|
|
|
|
|
Hi all,
I have a problem. I have 1 exe and several dll's. From my exe (mostly an MDI form) I call to the different dll's which contain mainly forms. When I want to close such a form, what's the best method 'Close()' or 'Dispose()'. You see, I want to be sure that the complete dll is removed from memory each time, since it is called by 'objAssembly.CreateInstance'...
Greetings,
Sigurd
|
|
|
|
|
Someone correct me if I'm wrong here:
If you didn't explicitly call the Win32 API function LoadLibrary(), you can't unload it.
DLL load and unload is handled automatically by the runtime (in both VB and VB.NET.) When your App loads, the runtime attempts to resolve all external references and loads the appropriate DLL's automatically. Then your app is able to call the functions you wanted. When you're done using the resources of the DLL, it WILL NOT unload. This won't happen (automatically, anyway) until your Application quits because that's when your releasing your references to the DLL.
RageInTheMachine9532
|
|
|
|
|
I am developing an application and i have lot of forms and i would like to keep these following features for simple text data(included in Textbox).
Undo
cut
Copy
Paste
Is there any method to generalize the situation.
Thank you in Advance.
John Joseph
Programmer in VB, VC
|
|
|
|
|
I'am looking for a away to enable CutCopyMode, run a Macro and then disable
CutCopyMode when I click on a button.
|
|
|
|
|
How do I get the users login name and pull it into VB?
THanks in advance for your help
|
|
|
|
|
you mean this :
VB:
<font color="blue">Private</font> <font color="blue">Sub</font> Button1_Click(<font color="blue">ByVal</font> sender <font color="blue">As</font> System.Object, <font color="blue">ByVal</font> e <font color="blue">As</font> System.EventArgs) <font color="blue">Handles</font> Button1.Click
<font color="blue">Dim</font> id <font color="blue">As String</font> = System.Environment.UserName & Chr(10) & System.Environment.UserDomainName
MessageBox.Show(id)
<font color="blue">End</font> <font color="blue">Sub</font>
hope that helps, you can also do this :
Imports System.Security.Principal <<< at top of form , then this :
VB:
<font color="blue">Private</font> <font color="blue">Sub</font> Button3_Click(<font color="blue">ByVal</font> sender <font color="blue">As</font> System.Object, <font color="blue">ByVal</font> e <font color="blue">As</font> System.EventArgs) <font color="blue">Handles</font> Button3.Click
<font color="blue">Dim</font> wp <font color="blue">As</font> WindowsPrincipal
wp = <font color="blue">New</font> WindowsPrincipal(WindowsIdentity.GetCurrent())
MsgBox(wp.Identity.Name.ToString)
<font color="blue">End</font> <font color="blue">Sub</font>
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
thanks..thats exactly what i needed
|
|
|
|
|
Hi,
I've noticed a small problem (for me) with the MonthCalendar control.
My app grabs info from a database when the selected date is changed. To
make a long story short, I want to use the DateChanged event. This is fine,
but it fires exactly every 2 minutes by itself.
I've tested it with timestamps.
While I can get around this with a boolean flag controlled by user inputs,
I can't find any info on this 'feature' anywhere.
Has anyone else come across this? I'd be interested to know the background
to it if anyone knows.
Thanks!
J
|
|
|
|
|
hi, i have been merging 2 projects written independently. Now i want to create global variable, which could be called by both projects. Any hint on how I can do that? Thankx
|
|
|
|
|
dear all
how to make a activex exe component which returns immediately after its function is called from a client.
any samples or source code will be appreciated.
regards
rIsHaBH
|
|
|
|
|
Hello
What do you wnat to return after the function call..
Do you want to raise any events or something like that.
regards
Computer City
Programmer in VB, VC
|
|
|
|
|
dear all
how to make a activex exe component which returns immediately after its function is called from a client.
any samples or source code will be appreciated.
regards
rIsHaBH
|
|
|
|
|
i'm trying to create an XML web service. I have done the following:
1) install & setup IIS
2) create ASP.NET web service in VB (called "HelloWorldService")
3) uncommented the HelloWorld web method in HelloWorldService.asmx
4) compiled the project
5) created a new VB.NET windows app (HelloWorldClient)
6) tried to add a web reference to http://localhost/HelloWorldService/HelloWorldService.vsdisco
i got the following errors:
Errors
The document at the url http://localhost/HelloWorldService/HelloWorldService.vsdisco was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'WSDL Document' is 'There is an error in XML document (2, 2).'.
- <dynamicdiscovery xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17"> was not expected.
- Report from 'DISCO Document' is 'Discovery document at the URL http://localhost/HelloWorldService/HelloWorldService.vsdisco could not be found.'.
- The document format is not recognized.
- Report from 'XML Schema' is 'Expected Schema root. Make sure that the root element is <schema> and the namespace is 'http://www.w3.org/2001/XMLSchema' for an XSD schema or 'urn:schemas-microsoft-com:xml-data' for an XDR schema. An error occurred at (2, 2).'.
----------
is there soemthing i forgot to do? if u can point me in the right direction, it'd be much appreciated
oh, and i'm running windows XP pro sp2 with IIS.
|
|
|
|
|
Don't use the .vsdisco, use the .asmx as your web reference.
IIRC the .vsdisco stuff is deprecated anyway.
--
Ian Darling
|
|
|
|
|
Thanks, I actually tried that and it gave me an option to save or open the file. I figured out why it wasn't working. I forgot to install some web components from the VS.NET install cd. Go figure.
Thanks
|
|
|
|
|
I have developed a vb.net project I want to distribute on other computers which do not have the net framework installed.
It is a relatively simple project, I have read this book which was expensive, but just leaves you hanging there, the setup wizard doesn't seem too helpful either. I have got so far, but need to go through a tutorial to make sure I get to the point where it says:
now copy this folder & contents to a cd & install on another computer!
any help or pointers much appreciated.
regards
Bob
|
|
|
|
|
|
Thanks for your time to respond, hope it is also some help for others.
I have briefly looked at them now, but have saved pages for more detailed exploration later
many thanks
bob
|
|
|
|
|
I'm running XP professional, service pack 1 and have VB6 installed with SP5 and I can't seem to get a WebClass project to run correctly. Even the basic IIS project template won't work - I get an HTTP 500 error, cannot display page. It appears that the default directory under localhost may not be getting created correctly but even if I add an alias folder on my local default website it still doesn't work. I can run the basic IIS project under Windows 2000 just fine. Any thoughts?
dpalazol
|
|
|
|
|
Why are you using Webclass? This was abandend by Microsoft and Webclass projects DO NOT convert to VB.NET.
Webclasses were a good idea, but were a pain to use. I had nothing but problems with them. One project I was in the middle of developing just started to fail to compile after adding a couple lines of debug code. The failure was it couldn't resolve an external reference to a DLL that was used by the Webclass itself! I got to the point where I had to blow away the MACHINE and reload everything in order to get it to work again!
My advice is to switch to VB.NET and save yourself the major headaches.
RageInTheMachine9532
|
|
|
|
|
this is the code i used in eVC++, in the Windows CE API in the WinMain function, from grattan's, [i]pocket pc development in the enterprise.[/i]
SHELLEXECUTEINFO sei;
TCHAR tFile[255];
if (lpCmdLine[0]==0) wsprintf(tFile, TEXT("\\ePowerDiagnostic.vb"));
else
wsprintf(tFile, lpCmdLine);
ZeroMemory(&sei, sizeof(sei));
sei.cbSize = sizeof(sei);
sei.lpFile = tFile;
return ShellExecuteEx(&sei);
return 0;
supposedly, since the eVB application (project1.vb, [i]ePowerDiagnostic.vb in my case[/i])is "associated with the pvbload.exe, the ShellExecuteEx will load the pvbload.exe file with the project1.vb as a parameter ( just as if we were tapping the project1.vb file from the start menu or programs folder.
however, i followed the instruction, imported an icon, and compiled by using the relase suffix and building the project. i copied the lauch app to the device. however, the error msg i keep getting on the pocket pc is
" 'ePowerDiagnostic' is not a valid Pocket PC application "
I'm not sure where I went wrong....
thx.
|
|
|
|