|
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.
|
|
|
|
|
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.
|
|
|
|
|
Check out "PocketPrep" from handango.com.
It has 90 questions based on the test spec. (070-316 and 070-306)
|
|
|
|
|
I need some information for a html2text source code in vba for a windows office xp application.
the prigram should be able to display the converted .doc file in the same design as the source html file!
Please tell me where i can download some source codes...
thanx!
|
|
|
|
|
I already build a table inside a dataset. The rows of the table consist of basic varchar and integer columns accept for a binary column.(My image problem)
I want to write the rows as whole into the my sql database from the dataset.
I would really appreciate it if any can help me with this problem.
If possible I would like to use a stored procedure to solve this problem
Regardt
|
|
|
|
|
I ran into a problem inserting/updating images through a stored procedure, I think because of a limit to the size of data sent through a stored procedure parameter. To solve this problem, I execute inserts and updates directly, like this:
Public Function Insert(ByVal imageData As Byte(), ByVal imageType As String) As Integer<br />
Dim cmdText As String = "INSERT INTO MyImages(Image, ImageType) VALUES(@image, @imageType) SELECT SCOPE_IDENTITY()"<br />
Dim args(1) As SqlParameter<br />
args(0) = New SqlParameter("@image", imageData)<br />
args(1) = New SqlParameter("@imageType", imageType)<br />
<br />
Try<br />
Return CInt(SqlHelper.ExecuteScalar(ConnectionString, CommandType.Text, cmdText, args))<br />
Catch ex As SqlException<br />
' do error handling<br />
Throw<br />
End Try<br />
End Function
NOTE: I'm using the Microsoft Data Access Application Block[^] (SqlHelper) for data access.
|
|
|
|
|
I had the same problem with the stored proc & Oracle. You will have to do the insert directly, or use a SP to create the entry without the image data & then update the record with the image data.
|
|
|
|
|
I solved the problem adding a datacolumn, with formula qt*price, to the dataview.
Max
|
|
|
|