|
You can try using the SendKeys function (Lookup MSDN)
You can send a specific key sequence using SendKeys (Eg Alt+H or Alt+F4)
|
|
|
|
|
Hi
I am using a datagrid to indicate employes that are on leave iver a certain period. The code works well for employees that take leave more then one day. The problem arises when the employee only takes one day leave, the datagrid shows the day of leave and every other day up until the end of the array. Please help
<br />
For i = 0 To oDS.Tables("Dept_History").Rows.Count - 1<br />
<br />
dr = dt.NewRow()<br />
dr(0) = oDS.Tables("Dept_History").Rows(i).Item("Name").ToString()<br />
<br />
iCol = 1<br />
For m = Month(NewStartD) To Month(NewEndD)<br />
If m = Month(NewEndD) Then<br />
lastday = Day(NewEndD)<br />
Else<br />
lastday = Darray(m)<br />
End If<br />
If m = Month(NewStartD) Then<br />
startday = Day(NewStartD)<br />
Else<br />
startday = 1<br />
End If<br />
<br />
For d = startday To lastday<br />
Dim CheckDate As Date<br />
Dim SD As String<br />
Dim ED As String<br />
Dim ld As Long<br />
Dim FDate As New Date(Year(NewEndD).ToString(), m.ToString(), d.ToString())<br />
<br />
'FDate = m.ToString() & "/" & d.ToString() & "/" & Year(NewEndD).ToString()<br />
ED = oDS.Tables("Dept_History").Rows(i).Item("EDate").ToString()<br />
SD = oDS.Tables("Dept_History").Rows(i).Item("SDate").ToString()<br />
ld = DateDiff(DateInterval.Day, CDate(ED), CDate(SD))<br />
<br />
If DateDiff(DateInterval.Day, CDate(FDate), CDate(SD)) = 0 Then<br />
dr(iCol) = d.ToString()<br />
ElseIf DateDiff(DateInterval.Day, CDate(FDate), CDate(ED)) = 0 Then<br />
dr(iCol) = d.ToString()<br />
Else<br />
dr(iCol) = "0"<br />
End If<br />
iCol = iCol + 1<br />
Next d<br />
Next m<br />
<br />
dt.Rows.Add(dr)<br />
Next i<br />
<br />
Dim dv As New DataView(dt)<br />
<br />
laDatagrid.DataSource = dv<br />
laDatagrid.DataBind()<br />
<br />
|
|
|
|
|
I created my first web service and accessing it from IE on the local machine works great. But when I try to access from another computer on the network I can see the definitions but cannot execute any of the functions? It says they are only avaiable to the local machine. How do I make it available for any machine?
|
|
|
|
|
Here Is The Answer:
Your problem lies in your machine.config file which will most likely
be in the following directory:
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG
The problem is that .NET 1.1 ships with HttpPost and HttpGet turned
off. look for the following tags:
<webservices>
<protocols>
<add name="HttpSoap1.2">
<add name="HttpSoap">
<add name="HttpPostLocalhost">
<add name="Documentation">
You will notice that HttpPost and HttpGet are commented out. Uncomment
them and it should fix your problem.
Thanks,
Kenton Smeltzer
|
|
|
|
|
You found that on Google too hugh?
I just had the same issue.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
How to write macro which will be set AssemblyVersion,when program is compiled like this:
1.1.X.Y
where x- is current Month & Day and Y - is current Time
Somebody can Help me?
S_W
|
|
|
|
|
Hi,
I use Inet control to download a file (HTTP)
in the StateChanged event to get data using : GetChunk
the problem is that i want to display a progress bar so I need to know the total
length of the file .. I use something like this:
<br />
If State = 8 Then<br />
n=val(Inet.GetHeader("Content-length"))<br />
end if<br />
it works but some times i get an error .. should I call GetHeader when the state is 12 not 8?
what is the difference ? I read MSDN but wasn't clear in this point..
|
|
|
|
|
event notification DLL to GUI Application
I m working on a event notification application.. i have made a publisher DLL with event class and registered at COM+ services and also a subscriber DLL which are implementing the publisher' event..(like loosly couple example in msdn).. after a subscription the subscriber DLL is getting the notification.
Now i have added subscriber DLL in my GUI exe application...but when the event occur or when the event notification is generated my application didnt get any response from subscriber DLL...WHY?
how my appication will get response from subscriber DLL, that when event occur....i have already used "withevents" but nothing happened?
anand
__________________
``
|
|
|
|
|
This is my Problem:
I have two projects open.
Project #1 is the server App. It loads a list of Dll from a Configuration file.
I load a DLL into my application on startup and can call procedures from it.
I want to be able to have the Server App unload the Dll.
Project #2
I will modify the DLL ,Save it , and then have the Server App reload the Dll and use it.
I can't seem to unload a DLL without closing the Server app.
I have everything else working fine.
Anyone have any ideas?
|
|
|
|
|
This is a problem that comes up a lot. The short answer is: you can't. The long answer is that this is managed code - the CLR manages everything for you and there's very little you can do about it. As far as "Project #2" goes, you should look at System.CodeDOM and the System.Reflection.Emit namespaces. Using those you could "easily" read-in a template "DLL", modified it, then emit an assembly either in memory (loaded into the current AppDomain) or in memory AND on disk (thus saving it for future use). Several libraries - even the .NET Framework use this technique for non-persisted assemblies, but persisting it is as simple as using a different Enum value in the very same method!
Good luck!
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
Thanks for your assistant.
I will research the namespaces you suggested.
This is my overall project.
I want to create a server app that runs all the time.
I want the server to load plugins and run them on set intervals and on specified events.
I wanted to create the plugins in VS.net and copy the dll to the plugin location.
I also have researched the CodeDom namespace and can actually create the plugins from the Server app and compile/load/Run them but for this to function correctly, I should give the end user the ability to modify the source code of the plugin and recompile/load/run without restarting the server app.
If the System.Reflection.Emit will create dynamic assemblies in memory then this may work better than saving them to a dll and loading them for each use.
This is my attempt at creating an app with scripting embedded in it.
Thanks again for your help
=======================================
When your in school all you want is to get out in the real world. Now that I'm in the real world all I want is to go back to school.
|
|
|
|
|
Actually, if scripting capabilities are what you're looking for, this issue is already solved. You can use the assembly emit stuff to parse, compile, and load script. There are even ways to interop with Windows Script, allowing any scripted language (JScript, VBScript, PerlScript, etc.) to work, so long as you supply the script engine with the objects, methods, properties, and events it can walk and use. See MSDN for more information.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
|
I tried to modify my code to generate the assembly in memory
instead of creating the dll on disk. and I get an error.
An unhandled exception of type
'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not find file "C:\DOCUME~1\GDUDLE~1.MBI\LOCALS~1\Temp\cdqmv_u2.dll".
Unhandled Exception: System.IO.FileNotFoundException: Could not find file "C:\DOCUME~1\GDUDLE~1.MBI\LOCALS~1\Temp\cdqmv_u2.dll".
File name: "C:\DOCUME~1\GDUDLE~1.MBI\LOCALS~1\Temp\cdqmv_u2.dll"
does this mean it is still creating and loading from the disk? The filename it is displaying changes each time I run it so I assume it is a temp file.
=================================
When i was in school all I wanted was to get out into the real world.
Now that I'm in the real world all I want is to go back to school.
|
|
|
|
|
I need Help! I'm trying to convert this script to VB.Net but its in java and I don't fully understand java to well.
var logQuery=new ActiveXObject("MSUtil.LogQuery"); <br />
var recordSet=logQuery.Execute("SELECT * FROM <1>"); <br />
<br />
for(; !recordSet.atEnd(); recordSet.moveNext()) <br />
{ <br />
var record=recordSet.getRecord(); <br />
for(var col=0; col<recordSet.getColumnCount(); col++) <br />
{ <br />
if(record.isNull(col)) <br />
WScript.Echo("NULL"); <br />
else <br />
WScript.Echo(record.getValue(col)); <br />
} <br />
}
ok I tryed this but:
'ExecuteBatch' is not a member of 'System.Array'.
Dim szQuery As String = szSelectClause & szAS & szLogFileDir & szLogFiles & szWhere & HackCond & szGrouped<br />
Dim test3 As MSUtil.COMIISW3CInputContextClass<br />
Dim test2 As MSUtil.COMCSVOutputContextClass<br />
Dim g_LogParser As MSUtil.LogQueryClass() <br />
Dim recordSet As MSUtil.ILogRecordset = g_LogParser.Execute(szQuery, test3, test2)<br />
|
|
|
|
|
Hello,
I'm using vb.net . I want to make a window
behind all other windows. I don't want to use hide()
and SendToBack() don't work. How can I do it?
thanks
|
|
|
|
|
there isnt a zorder like in vb6 ,but SendtoBack works fine, i just placed a listview over the top of a richtextbox then on a command button did the following
ListView1.SendToBack()
and the listview got sent to the back ( behind the richtextbox )
|
|
|
|
|
Hi,
I have designed a usercontrol with a label-, a textbox- and a button-control. To accelarate the design-time I have tried to bring some of their properties on top of the property-editor, f.e. like this
dim fLV as boolean
<br />
<Category("Basic Properties Label")> _<br />
Public Property LabelVisible() As Boolean<br />
Get<br />
Return fLV<br />
End Get<br />
Set(ByVal Value As Boolean)<br />
fLV = Value<br />
Label1.Visible = fLV<br />
End Set<br />
End Property<br />
After that I have created a form with a tab-control and about 4 sheet. When I insert my new control on page1-3, then activate page 4 and run then program, all of my self-created controls are no longer visible. This effect is shown even at design-time after an execution of my program.
I'm looking for a solution , until now, I haven't found any. Maybe you have one?!
Greetings
Knut Freyer
Bonn
|
|
|
|
|
Hello,
I tried to fill combobox with the property :
ComboBox1.DataSource = SelectByName() 'return a datatable
ComboBox1.DisplayMember = "NOTES_TEXT"
ComboBox1.ValueMember = "ID_NOTES"
And it works well.. But when I try to do this on the same form :
ComboBox1.DataSource = SelectAllName() 'return a datatable
ComboBox1.DisplayMember = "NOTES_TEXT"
ComboBox1.ValueMember = "ID_NOTES"
ComboBox2.DataSource = SelectAllNotes() 'return a datatable
ComboBox2.DisplayMember = "NOTES_TEXT"
ComboBox2.ValueMember = "ID_NOTES"
The combobox are binding but I have two times the same value : the combobox1 have de value (data) of the combobox2 !! If I do that on a different form, it's work !!
Why.. it's two different DataSource..?! If it's because there is two times the same DisplayMember and ValueMember what I have to do ??
Thanks a lot for your answer..
Julien
|
|
|
|
|
Hi,
I'm a VC++ programmer, and I need now to develop some ActiveX controls in Visual Basic 6.0 for a client. Could you point some good book about this issue ? ( well and another good book to learn Visual Basic ).
Thanks in advance
Braulio
|
|
|
|
|
Mastering Visual Basic 6.0 (by Evangelos Petroutsos) - Sybex press, Is a great VB6 book and I recommend it.
|
|
|
|
|
From where i can download the Source code of that book. (for Free)
|
|
|
|
|
To download the source code for examples of this book go to
www.sybex.com[^]
and search for the title..You'll find a link in the page that directs you where to download code on the CD.
I'm not sure if the book itself is available online.
|
|
|
|
|
Hi,
i have 2 dynamic rectangleF and one string.
Now i want to use the substring to split the text in 2 parts.
If the first rectangle is full, then use the second one.
Is there any way to draw a string inside a polygon ?
If yes, i would use that..... but at the moment i can only fill text
in rectangleF with Drawing.String.
Or know someone how i can see the text.length for the first rectangleF (max. length),
so that i can use substring on it.
Hope someone can help
Darkmoon
|
|
|
|
|
I want to load a data grid with data in an XML file. I know i can do this with the ReadXML method of a dataset and then set the DataSource of the grid = to the dataset. But how do I take all the data in the grid and get it back into a dataset so I can save it back to XML format? Also how can you set the column widths for each column and do things like center the column headings and things like that?
|
|
|
|