|
With .NET, the argument is no longer true since managed code is managed code - all .NET languages compile to IL and use the CLR - the only differences are any language-specific differences, which if the application is CLS compliant are not supposed to be used anyways.
|
|
|
|
|
Any body can help me for creating the audit log for vb form for all the activities with that form.Also Database activities should get logged.
Thanks/Regards
|
|
|
|
|
Does anyone have a solution to this problem:
When implementing a ControlDesigner or ParentControlDesigner, if one has a
UserControl that contains child controls as follows:
+========UserControl=========+
| +-----------------------------------+ |
| | Caption Panel | |
| +-----------------------------------+ |
| +---------------------------------- + |
| | Content Panel | |
| +-----------------------------------+ |
+=========================+
My desire is to have ToolboxItems that are added to the UserControl at
design-time be added as children of the ContentPanel.
- Using a ControlDesigner and invoking CreateComponent() adds the control to
the current design document (the UserControl).
- If one attempts to "re-parent" the control being "dropped" within the
designer for the UserControl by doing the following
Control target = ((myUserControl)this.Control).ContentPanel;
// the (child) Control where the dropped control should be moved-to
this.Control.Controls.RemoveAt(this.Control.Controls.IndexOf(ctl));
// remove the control from the UserControl (top-level parent)
ctl.Parent = target;
// assign the .Parent property of the control
target.Controls.Add(ctl);
// add the dropped control to the ContentPanel Controls collection
The error "Object reference not set to an instance of an object" occurs.
Do I need to create a(nother) designer for the ContentPanel so that IT can
serve as the target of the DragDrop? Is there some other (more expedient)
way to do this? Initiate an additional DesignerTransaction that makes the
re-parenting change? Making the .Parent and Controls[] change, and then
using the ComponentChangeService to make Changing/Changed notifications on
the "Parent" and "Controls" PropertyDescriptors ?
|
|
|
|
|
Sorry for my pure english.
I have created the WEB service which works with database. It works well.
Then I need to have access to this WEB service via IExplorer.
So I create the WEB client application and form on its web-page.
I send the ID value via this form to WEB service and get the answer to table below the form.
I need to obtain the query result on new separate web-page.
Question: How to do it?
|
|
|
|
|
Presumably the first page is used to get all of the parameters to use the web service. On the first page use the Page.IsPostback method to see if details have been submited. Then do a Response.Redirect or Server.Transfer to the page you want to display the results in. In the url pass the values you want to use in your webservice in the querystring. E.g. Response.Redirect("MyPage.aspx?key1=" & TextBox1.Text & "&key2=" & DropDownList1.SelectedValue. In MyPage.aspx use those values to query the web service on that page (Use Request.Querystring("key1") etc).
Jim
|
|
|
|
|
I am trying to get a number that will start at (2 digit month, 2 digit year (not visible) and 3 digit sequence number) that will automatically reset to 001 when the month changes. The number needs reference a table and go off the last number used. I have not been having any luck with it :banghead: any suggestions?
Private Sub cmd1_Click()
Set localConnection = CurrentDb()
Set rJN = localConnection.OpenRecordset("TEST")
rJN.MoveLast
Dim cMonth As Integer
Dim cYear As Integer
Dim vYear As Integer
Dim vMonth As Integer
Dim vNum As Integer
vYear = Int(Val(Left$(rJN![Test], 2)))
vMonth = Int(Val(Mid$(rJN![Test], 2)))
vNum = Int(Val(Right$(rJN![Test], 3)))
cYear = Year(Now)
cMonth = Month(Now)
If vMonth = cMonth Then
rJN = rJN + 1
Else
rJN = "001"
End If
End Sub
:help: Thanks
|
|
|
|
|
Set localConnection = CurrentDb()
Set rJN = localConnection.OpenRecordset("TEST")
rJN.MoveLast
dim dtRS as Date = rJN![Test]
If dtRS.Month = Now.Month Then
dtRS.Month = dtRS.Month + 1
Else
dtRS.Month = "01"
End If
debug.writeline (dtRS.ToString)
Have not tested this...but may be this is what u want...
Regards,
NetPointer
|
|
|
|
|
How do one restore/refresh a database connection in code, without exitting?
|
|
|
|
|
Hi all VB gurus, anyway to print a microsoft access 2000 report from a VB app? I'm using an ADO Connection interface at the minute, but I'm guessing I'll having to use another component? Thanks all who give it a go.
|
|
|
|
|
...to find the current transperancy level of the windows' taskbar. I have a function to set a specific transperancy level though the windows API, but how can I get a value of an existig, or should I say current transperancy level?
any help would be greatly appreciated.
|
|
|
|
|
Hi...
Nice to hear from u all
By the way, I'm trying to do a program to control printing.
The scenario:
I have 1 mass volume printer and 1 normal printer. The system would be able to detect the number of copies that I send and automatically assign to the correct printer. Less than 25 copies go to normal printer, and more than 25 copies go to mass volume printer.
How should I start to do this program?
What languages would be appropriate to program it ?
Please help me, I'm just a starter in programming field.
Your help would be very useful for me, and I'm very grateful to hear from u all....
thanks
regards,
wism chan
|
|
|
|
|
I have a calendar in web application vb.net.
I have a month dropdown box, a day dropdownbox and a year dropdown box.
When I select the Month, I can get my calendar to change to month but right now
have hard code at end for /1/2003. How do I get it to change for month and stay on
whatever day and year.
And then select the day I want in the dropdown box and change the day in calendar but
keep the month i just selected and year shown.
And then select the Year I want in the dropdown box and change the year in calendar
but keep month and day I just selected in other dropdown boxes?
Can't figure it out.
This is my dropdown list so for for the Month which works , but then I need it to stay
on the selected month and change for day, year. Can't figure out without hard code
at end "/1/2003" which I don't want, because day and year dropdown lists when selected
need to change for whatever I select.
PLEASE HELP!!!!! Thank you.... Alex
Private Sub ddlMonth_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlMonth.SelectedIndexChanged
'ddlMonth.DataValueField = Calendar1.SelectedDate.Month
Calendar1.SelectedDate = CDate(ddlMonth.SelectedIndex + 1 & "/1/2003")
Calendar1.VisibleDate = CDate(ddlMonth.SelectedIndex + 1 & "/1/2003")
End Sub
|
|
|
|
|
I have some Crystal Reports that I am using in my VB6 application that I would like to convert to .net and was wondering if I could somehow use my old reports in .Net ?
ALso, can I use my reports in the version of Crystal Reports that comes with .net or would I have to buy a package ? Which isn't goint to happen soon due to my unemployment, which is why I a asking.
Thanks
Tony
|
|
|
|
|
Hi,
I have a problem parsing a WSDL xml with an XMlDocument.
This is a short version of the XML:
<?xml version="1.0" encoding="utf-8" ?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://tempuri.org/WebReferenceAddin.DefaultCustomer/CustomerEngine" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/WebReferenceAddin.DefaultCustomer/CustomerEngine" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types />
<message name="GetCustomerSoapIn" />
<message name="GetCustomerSoapOut" />
<message name="GetCustomerByNameSoapIn" />
<message name="GetCustomerByNameSoapOut" />
<portType name="CustomerEngineSoap" />
<binding name="CustomerEngineSoap" type="s0:CustomerEngineSoap" />
<service name="CustomerEngine">
<port name="CustomerEngineSoap" binding="s0:CustomerEngineSoap">
<soap:address location="http://localhost/webreferenceaddin.defaultcustomer/customerengine.asmx" />
</port>
</service>
</definitions>
The code I use is:
Dim dom As New System.Xml.XmlDocument
dom.Load(URL.Text)
'Create an XmlNamespaceManager for resolving namespaces.
Dim nsmgr As System.Xml.XmlNamespaceManager = _
New System.Xml.XmlNamespaceManager(dom.NameTable)
For Each att As System.Xml.XmlAttribute In dom.DocumentElement.Attributes
If att.Prefix = "xmlns" Then
nsmgr.AddNamespace(att.LocalName, att.Value)
End If
If att.LocalName = "xmlns" Then
nsmgr.AddNamespace("", att.Value)
End If
Next
When I use the commandwindow for selecting the service element I get:
>? dom.selectsinglenode("./node()[1]/service",nsmgr)
Nothing
But the statement below gives
>? dom.selectsinglenode("./node()[1]/node()[8]",nsmgr)
{System.Xml.XmlElement}
[System.Xml.XmlElement]: {System.Xml.XmlElement}
Attributes: {System.Xml.XmlAttributeCollection}
BaseURI: "http://localhost/webreferenceaddin.defaultcustomer/customerengine.asmx?wsdl"
ChildNodes: {System.Xml.XmlChildNodes}
FirstChild: {System.Xml.XmlElement}
HasChildNodes: True
InnerText: ""
InnerXml: "<port name="CustomerEngineSoap" binding="s0:CustomerEngineSoap" xmlns="http://schemas.xmlsoap.org/wsdl/"><soap:address location="http://localhost/webreferenceaddin.defaultcustomer/customerengine.asmx" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /></port>"
IsReadOnly: False
Item: <cannot view indexed property>
LastChild: {System.Xml.XmlElement}
LocalName: "service"
Name: "service"
NamespaceURI: "http://schemas.xmlsoap.org/wsdl/"
NextSibling: Nothing
NodeType: Element
OuterXml: "<service name="CustomerEngine" xmlns="http://schemas.xmlsoap.org/wsdl/"><port name="CustomerEngineSoap" binding="s0:CustomerEngineSoap"><soap:address location="http://localhost/webreferenceaddin.defaultcustomer/customerengine.asmx" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /></port></service>"
OwnerDocument: {System.Xml.XmlDocument}
ParentNode: {System.Xml.XmlElement}
Prefix: ""
PreviousSibling: {System.Xml.XmlElement}
Value: Nothing
What is wrong?
Thank you,
Raf.
|
|
|
|
|
Hi Raf!
You could use following XPath query:
node()[1]/*[name()='service']
For a good overview of all XPath possiblities (including interactive testing!), visit http://www.zvon.org/xxl/XPathTutorial/General/examples.html. To do some more interactive testing you can use the XPath Visualizer Version 1.4 (http://www.vbxml.com/xpathvisualizer/default.asp).
Greetz
Jan
|
|
|
|
|
Thank you for the solution.
It works. I will check the site later this week.
Raf.
|
|
|
|
|
We make extensive use of Datagrids in our project but a lot of the data displayed in the grid is either to big for the specific column or the column is to big for the data.
Can ANYONE tell me how to resize only certain columns in the datagrid????
|
|
|
|
|
Hi!
I've also tried this and went crazy doing so... I don't think it's possible.
My advice is to use a ListView Control. You can't use Databinding then, but you can resize your columns to whatever size you want....
If anyone knows how to resize the datagrid columns, i'd like to know how to do it, too!
Sorry I couldn't give you better advice...
-Timo
|
|
|
|
|
Heres how I arrive at my dilema (a very simplified example):
1. Create a new Window Application Solution.
2. Add to the project a new user control, lets call it UserControl1
3. Add 1 panel to UserControl1, lets call it Panel1. Dock it to the right and size it such that it takes up half of the available real estate.
4. On the main form for the application, place an instance (from the toolbox) of UserControl1 anywhere you like.
5. Now place a button in the panel of UserControl1.
Step 5 seems impossible. I would like to create a control type whose purpose is to contain other controls (and other things). But everytime I try and place this control in the Panel, it appears behind the panel. The container for the button is always UserControl1 not Panel1. How can I make the container for the newly placed button be Panel1 and not UserControl1? (Using typical Design View method (drag and drop).
Thanks for your time...
|
|
|
|
|
declare AddForm Lib "winspool.drv" Alias "AddFormA" _
(ByVal hPrinter As Long, ByVal level As Long, pForm As Byte) As Long
Who can give sample code
|
|
|
|
|
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B282474
|
|
|
|
|
That is in vb6.0.But now i use in vb.net.It can't work.
The reason is API Function CpoyMemory and AddForm can't use in VB.net.
|
|
|
|
|
Hi... I need help terribly... I'm using Visual Basic .NET.
As my subject, is there any way to convert Microsoft Words/Excel into an image programatically? Or is there any 3rd party component which allows me to manipulate the conversion programatically in my application? I wanna perform wat the Tablet PC Journal Writer can do, i.e. export the word .doc into an image and allows me to "ink" on it.
I would need VB.NET snipplets to understand.
Thank you..
|
|
|
|
|
I would look into opening the document using the Office Object Model and then seeing what formats are available to "save as" that document in.
|
|
|
|
|
I need to marshal a structure so that I can pass it to a C++ DLL and
vice versa. The following works correctly:
<structlayout(layoutkind.sequential)> _
Private Structure PLCDATA
<marshalas(unmanagedtype.i4)> Dim w1 As Int32
<marshalas(unmanagedtype.i4)> Dim w2 As Int32
<marshalas(unmanagedtype.i4)> Dim w3 As Int32
<marshalas(unmanagedtype.variantbool)> Dim b1 As Boolean
<marshalas(unmanagedtype.variantbool)> Dim b2 As Boolean
<marshalas(unmanagedtype.byvalarray, sizeconst:="5)"> Dim Arr() As Int32
Sub initialize()
ReDim Arr(4)
End Sub
End Structure
Now I need to have another item in the structure be an array of a
different structure. Hope that makes since. I thought this would
work but it gives me an error:
<structlayout(layoutkind.sequential)> _
Private Structure PARCEL
<marshalas(unmanagedtype.i4)> Dim Induct As Int32
<marshalas(unmanagedtype.i4)> Dim Dest As Int32
<marshalas(unmanagedtype.i4)> Dim Reason As Int32
End Structure
<structlayout(layoutkind.sequential)> _
Private Structure PLCDATA
<marshalas(unmanagedtype.i4)> Dim w1 As Int32
<marshalas(unmanagedtype.i4)> Dim w2 As Int32
<marshalas(unmanagedtype.i4)> Dim w3 As Int32
<marshalas(unmanagedtype.variantbool)> Dim b1 As Boolean
<marshalas(unmanagedtype.variantbool)> Dim b2 As Boolean
<marshalas(unmanagedtype.byvalarray, sizeconst:="5)"> Dim Arr() As Int32
<marshalas(unmanagedtype.byvalarray, arraysubtype:="UnmanagedType.Struct," sizeconst:="3)"> Dim Items() As PARCEL
Sub initialize()
ReDim Arr(4)
ReDim Items(2)
End Sub
End Structure
The error I get looks like this:
System.TypeLoadException: Can not marshal field Items of type PLCDATA:
This type can not be marshaled as a structure field.
at Test_PLCData.Form1.ReadFromPLC(PLCDATA& pRead)
at Test_PLCData.Form1.Button1_Click(Object sender, EventArgs e) in
C:\Esanti Code\C++\PLC_Data DLL\VB.NET Test App\Test PLCData\Test
PLCData\Form1.vb:line 106
Can anyone tell me how to get this to work correctly? Thanks in
advance!!!
|
|
|
|