| Adding TCP/IP Printer Ports and Drivers using a login script |
|
 |
Index ‹ Visual Studio ‹ VB Scripts
|
- Previous
- 1
- MFC >> oleacc problemhello!
i written apllication (Visual Studio .NET 2002) and have to launch it with
XP Embedded. when i try to start the application system error message "DLL
oleacc.dll not found" appears. i've attempted to use DELAYLOAD linker option
but it hase no effect. i attempted to use oleacc empty library, but have
received a message "access violation @0 read address 0".
i not used accessibility tools. is it possible to build the program without
using of oleacc.dll? thank you!
- 2
- Visual Studio C++ >> convert VC++ code into VB6we have a function in a dll. Its protocol is:
int __stdcall CKT_ReportConnections(int **pSno);
VC demo code is:
[
int *pSno;
int count = CKT_ReportConnections(&pSno);
for (int i=0; i<count; ++i)
printf("%d", pSno[i]);
]
How can I write the same in VB6?
I may know this function declaration that maybe is :
[
Public Declare Function CKT_ReportConnections Lib
"DLLNAME.dll" (ByRef
pSno As Long) As Long
]
But then what i should write the above demo in VB6?
Thx a lot.
- 3
- MFC >> Bad Web LinksI have a problem on one particular computer in France. In researching the problem, I thought that the bug was related to the problem reported in
http://support.microsoft.com/default.aspx?scid=kb;en-us;30560
This page isn't really dated but was last checked 9/2003
The page also allows downloads of the patch. For English Windows 2000, it leads to page
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=6D5E05E6-2D13-4FE7-B322-DFBF1B4589C
which is dated 11/2001. The description on the page does not match the first page, either
Now, the original problem is fixed in Visual Studio 6.0, Service Pack 6 which wasn't released until 3/2004. Service Pack 5 was released in 2000. (At least the Readme's file list doesn't seem to list anything past 2000.) I'm guessing that the first file was generated in 2003, and does not link successfully
Since our problem is not related to this problem (further testing proves that formatting floats isn't crashing us, but I don't know what is crashing us at this point) it does not really affect me, but I would like the ability to download the new MSVCRT DLL on a non-development machine
Thanks
Terry
- 4
- VB Scripts >> excel spreadsheet object for ASPDoes anyone know how to add a graphic to a hyperlink in
the spreadsheet control for ASP.
I know how todo this in excel using a picture and creating
a hyperlink on it.
But how can I do this in the control?
is this doable?
thanks!
- 5
- 6
- 7
- Visual Basic >> hexadecimalI have a byte array declared in my application. The
decimal value of the first two indexes(1 to 2) represent
the lenght of the array in bytes. Then, if it is less than
256 bytes, the lenght occupies 1 byte. However, if it is
over 255 bytes, it would occupy two bytes.
Let me put an example to clarify this
1 byte is assigned this way. Let us suppose that the
lenght
is 81 bytes and the lowest index in the array is 1
bytearray(1)=&h0
bytearray(2)=&h51 ' hex code for letter Q whose decimal
value is 81 (the value we are looking for)
packets longer than 255 would require two bytes
QUESTION 1
What about if the lenght is over 255 bytes (decimal). Two
bytes would be required to store the lenght. How can I
assign this lenght to the first two bytes in the array
QUESTION 2
How can I turn into an integer the first two bytes of the
above question?
thanks
- 8
- Visual Studio C++ >> How can I make my subclass get the WM_DRAWITEM and WM_MEASUREITEM message?Hello, All:
I had wroten a programme which should redraw a CListBox and CListCtrl class,
But so strange, when I drag an object into a CDialog object, and setting a
member value to relate with the CListCtrl(or CListBox),then I changed the
member value's type into CMyListBox( or CMyListCtrl), By this time,I thought
it must can access the function which I inherited from the CListBox( or
CListCtrl),but I cannoot see my
void CMyListCtrl::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT
lpMeasureItemStruct)
and
void CMyListCtrl::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
were be called.
However, I found there's 3 types of different WM_DRAWITEM and
WM_MEASUREITEM's reaction function from the ClassView's "Add Window Handle",
I am not sure whether there's any different with them all.
Up till now, I think maybe there's something wrong with the CListCtrl's
type. Is there anybody who knows whether there's any problem with my
programme?And I also wanna get how different with these 3 types of
WM_DRAWITEM and WM_MEASUREITEM's reaction function.
The following is apart of my programme:
////
// TestDlg.h
///
class CTestDlg : public CDialog
{
// Construction
public:
...
CMyListBox m_ListBox;
...
}
///
// TestDlg.cpp
///
BOOL CTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
...
m_ListBox.AddString("FD");
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
}
///
// MyListCtrl.h : header file
//
class CMyListCtrl : public CListCtrl
{
...
protected:
//{{AFX_MSG(CMyListCtrl)
afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT
lpMeasureItemStruct);
afx_msg void OnInsertitem(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
//}}AFX_MSG
...
}
//
// MyListCtrl.cpp : implementation file
//
BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
//{{AFX_MSG_MAP(CMyListCtrl)
ON_WM_MEASUREITEM()
ON_NOTIFY_REFLECT(LVN_INSERTITEM, OnInsertitem)
ON_WM_DRAWITEM()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
////////////////////////////////////////////////////////////////////////////
/
// CMyListCtrl message handlers
void CMyListCtrl::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT
lpMeasureItemStruct)
{
// TODO: Add your message handler code here and/or call default
CListCtrl::OnMeasureItem(nIDCtl, lpMeasureItemStruct);
}
void CMyListCtrl::OnInsertitem(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
// TODO: Add your control notification handler code here
*pResult = 0;
}
void CMyListCtrl::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
{
// TODO: Add your message handler code here and/or call default
CListCtrl::OnDrawItem(nIDCtl, lpDrawItemStruct);
}
Thanks in advance!
- 9
- MFC >> button controlhi all,
i'm developing an SDI application by eVC++.
now in the CView, i created a button object.
when i received a click on the button .
i want to notify back the CView to update the screen.
how can i do that?
thank you.
- 10
- Visual Basic [VB] >> Extracting Parts of a StringHello,
I have a question about manipulating string in VB.NET2003.
I have a string that looks as follows:
MyString = "1st garbage blah, blah.. " & vbCrLf & _
"==============================" & vbCrLf & _
"2nd garbage blah, blah.. " & vbCrLf & _
"==============================" & vbCrLf & _
"3rd garbage blah, blah.. " & vbCrLf & _
"------------------------------" & vbCrLf & _
"4th garbage blah, blah.. " & vbCrLf & _
"------------------------------" & vbCrLf & _
"5th garbage blah, blah.. " & vbCrLf & _
"------------------------------" & vbCrLf & _
"6th garbage blah, blah.. " & vbCrLf & _
"------------------------------" & vbCrLf & _
"7th garbage blah, blah.. " & vbCrLf & _
"------------------------------" & vbCrLf & _
"8th garbage blah, blah.. " & vbCrLf & _
From this string, I would like to get rid of the all the separator
lines shown below:
"==============================" & vbCrLf & _
"------------------------------" & vbCrLf & _
And make a new string that contains the contents of MyString without
above two lines. Like this:
NewString = "1st garbage blah, blah.. " & vbCrLf & _
"2nd garbage blah, blah.. " & vbCrLf & _
"3rd garbage blah, blah.. " & vbCrLf & _
"4th garbage blah, blah.. " & vbCrLf & _
"5th garbage blah, blah.. " & vbCrLf & _
"6th garbage blah, blah.. " & vbCrLf & _
"7th garbage blah, blah.. " & vbCrLf & _
"8th garbage blah, blah.. " & vbCrLf & _
I been digging String methods for a while but have no idea how I can
do this operation.
Can anyyone give me an idea as to how to do this operation?
Thank you very much in advance!
- 11
- Mcse >> joining for microsoft news groupshello
i m a student of MCSE and i want to join your news
groups. Please send me a mail in my mail account after
accept this aplication.
Regards,
Thanks
M.IRFAN ANJUM
- 12
- Visual Basic >> Twain InterfaceIs there a way to access and scan an image using a twain interface. Is
there a way to take that image and cut it into sections and have VB
automatically save it?
- 13
- Mcse >> CertGuard - Info?Hi IT Community,
I decided to do some research on this so called www.certguard.com. I
see post over post about these braindumps. Well, let me tell you
something, I have done some extensive research on this CertGuard
company and I warn everybody to make a decision for themselves on this
company. CertGuard claims to watch for companies that state you will
pass on your first try, any company that offers 100% Pass Guarantee
and not a 100% Money Back Guarantee, what is the difference? There is
no difference. What seems to be really funny is that my best friend
ordered off transcender.com the so called (Reader's Choice Award) and
found their questions to be identical to the real exam. So, where does
CertGuard go off stating that www.transcender.com and other sites
listed on there website are clean when in fact they are not. Every
single vendor out there put's real if not very very similar exam
questions related to the real exam. You can view the list of the so
called CertGuard's clean list below:
http://www.certguard.com/reviews.asp
Now, you see many companies listed here: "Wonder if these companies
are paying for this?"
Now, let's look at www.transcender.com the so called (Reader's Choice
Award) winner. Which many many people have stated that in fact they do
provide the exact questions on there products.
According to Certguard.com, CertGuard states to stay away from the
below websites that state the below:
i. Every website that is owned by TestKing provides braindumps. Yes,
it's that obvious! If just ONE of TestKing's websites provides
braindumps, ALL of them do.
ii. Sites that advertise 'Actual Exam Questions & Answers' are most
likely passing off braindumps.
iii. Sites that offer a '100% Pass Guarantee on the FIRST try' (most
legitimate sites will offer a Money Back Guarantee, but this is
completely different than guaranteeing you a passing score.) Make sure
you read their Disclaimer before you jump into any commitments. OR
ASK
US!!!!
iv. Access to ALL of their practice exams for X number of dollars is
another sign of a braindump, no legitimate corporation can afford to
just give away their material for next to nothing. We've seen
legitimate practice exam run for as little as $40 or as much as $300
per exam, but we've never seen a legitimate site offer ALL of their
Exams in a bundle for such a cheap price.
v. Legitimate Practice Exams will generally cost around $100 per CD
(or Exam), unless the Test Prep provider is offering a discount, but
even then the kits are no less than $50 per CD. If you're looking at
buying a bundle of exams for that price, then you're almost sure to
be
purchasing braindumps.
vi. PDFs!! Not every PDF is a braindump, and not every braindump is a
PDF, but the odds of getting a PDF that isn't a braindump is pretty
rare. DON'T TRUST PDFs!!!
Well, looking at www.transcender.com, I found the below:
Furthermore, you can view more about there guarantee below:
http://www.transcender.com/guarantee/
They will refund your purchase the first time if you fail. Now this is
just one of the sites I picked on CertGuard's so called clean list.
Click also the link below:
http://www.transcender.com/dept.aspx?dept%5Fid=100000
You will see an image with a guy jumping with his leg's open, Read
what it states:
You will Pass the First Time Guarantee. End Of Discussion. (This is
the exact wording used on jrksoftware.com, another well known
braindump provider)
Proof backing up my claim on transcender. Please click the below posts
in newsgroups made by people ordering from transcender.
http://groups.google.ca/group/microsoft.public.cert.exam.mcad/browse_thread/thread/4740b2d9d62ca55c/a282ee8503baa62f?lnk=st&q=transcender+real+questions&rnum=3&hl=en#a282ee8503baa62f
Below is also another post from David Mickelson stating that Microsoft
does not support transcender.
http://groups.google.ca/group/microsoft.public.cert.exam.mcsd/browse_thread/thread/84123cf7f578717f/4fa05c8d04b0b552?lnk=st&q=transcender+real+questions&rnum=5&hl=en#4fa05c8d04b0b552
The link below is another post you can view on transcender's from the
user Coffee.
http://groups.google.ca/group/alt.certification.mcse/browse_thread/thread/fc929f997a2cbc7b/07825e55337c8266?lnk=st&q=transcender+real+questions&rnum=6&hl=en#07825e55337c8266
I can add more and more posts on this subject regarding Transcender
but I will stop here, you can do this research yourself, but I warn
you, watch for transcender staff trying to convince you otherwise on
the newsgroups.
To make a long story short, no one really knows if CertGuard is
getting paid off, only they know. It is so funny on how they defend
websites that they state are clean when people who have actually
ordered from those sites state otherwise.
My opinions are expressed below on the whole topic of braindumps and
CertGuard: Please feel free to comment on this.
1. Braindumps don't hurt the IT industry. The Hiring Managers
Incompetence is what is Hurting the IT industry. What's hurting the IT
industry are incompetent hiring managers. When hiring IT staff, it is
up to the employer to determine the applicant has the necessary IT
skills and knowledge to perform in their job to back up their
certification, and not just assume they do simply because they are
certified. People who use braindumps and just plain memorize questions
are easily detected by any competent hiring manager during the first
interview.
For example, if we were to compare 2 candidates with a CCNA
certification being interviewed for the same job, and lets say one
studied via CCNA instructor led classes and books, and the other
simply braindumps. During the first interview, the hiring manager
would surely ask the candidates some technical questions based on
their CCNA assumed knowledge and skills like describe the OSI layers
and their functions or something like this. The candidate that only
memorized the braindumps to pass the exam would not know how to reply
where as the candidate who studied hard would easily be able to answer
the question.
I know when I was interviewed for my job, I was tested on configuring
a Cisco router with NAT, also doing an IOS upgrade on a router, and
configuring MPLS on the router. I passed but the manager took extra
steps to ensure that I did indeed know what I was talking about. So,
what I am saying is to educate managers and companies to test there
employee's instead of just assuming that they are good.
2. CertGuard looks to me to support braindump sites, and possibly has
a financial interest in their supposed clean list of sites it
supports. CertGaurd clearly offers only biased information so take
everything you read from any of them carefully, in fact, I would not
trust them at all!
Reasons they are exploiting the IT industry is because they clearly
state certain sites are clean when any newbie to this industry can
tell they are not, and also because they are profiting from selling
advertising space on their website all in the name of their bogus war
on IT Braindumps and cheaters.
How do we know if any of them are actually certified? How did they get
their certifications? Maybe they bought them from testking? How can we
trust a group of online posters who seem to use Nazi-Like rhetoric and
Communist type phrases? Don't take my word for it, just check any of
their posts and you will surely see this to be the case.
Clearly, by simple investigation anyone can see that many of the sites
Certguard supports are Braindumps ie. QuickCert.com, Trancender.com,
Certways.com, jrksoftware.com etc...
Could it be possible that Certguard is receiving some form of
financial compensation for their support of these known braindump
providers? I would have to say yes since their War on Braindumps etc..
is simply an exploit of this issue for financial gain as they are
selling advertising on their website.
As we all know, if something sounds too good to be true, it usually
is. This has been my experience specifically with Certguard. At first
glance, I thought, finally, someone who will actually do something to
clean up the IT industry, but after really looking into their website,
it seems 100% clear that they have a financial interest in this so
called War on Braindumps. I would like to suggest that Robert Williams
rename this war to "My War Against Braindump Sites I Am Not Profiting
From!" because clearly as you will see below, many of the sites listed
on his bogus clean list are actually well know braindumps sites which
are probably paying him:
- QuickCert.com - They Claim this site is clean:
http://www.certguard.com/forums/topic.asp?TID=450
Clearly, this site is not clean because they have a direct link from
certifyexpress.com, braindumpcentral.com, braindumps.com, which
Certguard knows is a Testking owned website and a well known braindump
promoting site as you will see below:
On the homepage of certifyexpress.com, you will notice the very top
banner advertising for Testking.com, then the one just below it
advertising for Quickcert.com, and then there are 3 links for Actual-
Exams.com, Testking.com and you guessed it, Quickcert.com. Clearly,
you cannot dispute this evidence and clearly, certguard must have some
financial interest in promoting quickcert.com.
Here is another list from a CertGuard post which lists Braindump free
sites: http://www.certguard.com/forums/topic.asp?TID=270 out of this
list, there are clearly well KNOWN braindump sites like:
Certways.com - a well known braindump site most likely owned by
Testking with hosting on the same server as:
- Examways.com
- Examworx.com
jrksoftware.com - a longtime braindump provider using the EasyCert
name their homepage clearly states "you will pass the first time
guaranteed! In the left menu bar with a pic of a girl jumping for joy.
A simple backlink check will show that they have an incoming link from
Examblasters.com, which is also another braindump site:
http://www.google.com/search?q=link:http://www.jrksoftware.com/&hl=en&start=10&sa=N
gocertify.com - they claim to be clean, however they have a link on
their site for Practice Tests with goes to goexam.com which seems to
be their cover to sell braindumps with a Pass Guarantee and 25% - 50%
off their products.
Transcender.com - They provide a Pass on Your First Try Guarantee and
practice tests that contain actual exam questions. I know this
firsthand as my best friend used their material about 1 year ago and
found this to be the case. Surely not clean and also seems to have an
affiliate as listed next.
studyexam4less.com/transcender.asp - They also provide braindumps and
are well known to be doing this for some time now. They even have
their own page outlining the 100% Pass Guarantee here:
studyexam4less.com/Transcender-Pass-the-exam-the-first-time-
Guarantee.asp
certsavvy.com - offers a Pass the First Time Guarantee and is known to
provide real exam questions
3. CertGuard is Childish, Immoral and Useless.
They seem to always provide Useless info and no help for newcomers to
the IT industry and often end up insulting and or threatening your
legitimate beginner questions. CertGuard doesn't seem like a group of
people I would trust with my career choices so be very careful and
think for yourself.
Here is a perfect example of what I am talking about:
Post Topic: What requirement for MCSE
The First Guy posts about the requirements for MCSE but no one other
than Birol gives a useful reply. Cerebrus (who works for certguard)
and Certguard both give useless, insulting replies and also show just
how childish and immoral they are, so how could any one trust what
such rude and immoral people say, without doing their own research:
http://groups.google.ca/group/microsoft.public.cert.exam.mcse/browse_thread/thread/898b840717f20934/61957239a6843f67?lnk=gst&q=certguard&rnum=106&hl=en#61957239a6843f67
I would never ever trust my career choices with anything these animals
say. They are basically wolves in sheeps clothing, trying to make a
buck all while not helping and rudely poking fun at anyone that comes
into their path!
And if you think I am making this up, just check any of their posts
and you will surely see their wolf like attitude speak out loud:
This is in addition to what Larry J West has stated about certguard
for which I agree 100%:
http://groups.google.ca/group/microsoft.public.cert.exam.mcdst/browse_thread/thread/b913082dda4522e6/a6dd48bde6adf5f1?lnk=gst&q=certguard&rnum=76&hl=en#a6dd48bde6adf5f1
Larry States:
"You are right that many in the MCNGP / CertGuard group are very
childish, rude beyond belief, and in most cases [90% of the time] not
very helpful. Their insulting of people for no reason who are trying
to help people is truly beyond my comprehension, especially since
these are people who are supposedly knowledgeable enough on computers
to know that UseNet exists (Not everyone does) and hence have some
intelligence.
So why did you join them? I think their group's goals of stamping out
proxy-testers and braindumps is very laudable, but their actions are
just like the outgoing Clinton officials
glueing of the "W" keys on government computers - it doesn't show any
intelligence, it just shows how childish they are and destroys what
credibility they did have. This is a PUBLIC forum - their actions may
be fine in their fraternity houses on their college campuses, but not
in the real world. Their response to you in not acknowledging that
this is a problem (but just criticizing you further) is another sign
that they are ignorant and do not understand or care. Until they
change, I will not be joining that group, which is a shame, since I
too agree with cleaning up the certification mess."
Even the criticism of you putting your "MCP" in your signature is a
sign that some in the group's leadership deep down don't care about
increasing the values of all certifications. They just want to justify
their psychological need of putting people down and somehow believe
that this is a good method of doing so.
I would like to know why you gave them credibility for their actions
by joining their group.
4. CertGuard Is not to be Trusted?
Just read any of their posts and replies and you will certainly agree
that they are offensive, rude, not willing to help and in the end,
fraudulent as they claim to provide support for clean sites when they
actually support braindump type sites.
5. CertGuard should issue a War on Incompetent Managers. But there is
no financial gain in doing that! It is 100% up to the hiring manager
to weed out unqualified applicants, in reality, no one cares about
braindumps. Because there is no financial gain in this reality,
certguard will never come to grips with this and seems to continue to
pursue their fake war on cheaters!
These are just my opinions made by facts and observations that I have
seen and listed with regards to Certguard.com. You make you own
decision?
I have listed posts below that you can view and see for yourself on
this so called CertGuard company:
1. Many arguments that CertGuard may be covering and providing
braindumps:
http://groups.google.ca/group/microsoft.public.cert.exam.mcse/browse_thread/thread/5d98421a377bcb3b/9a3a6262b88ed1b1?lnk=st&q=certguard&rnum=2&hl=en#9a3a6262b88ed1b1
2. Exams Required for MCSE -> LarryWestMCSD (5th post down) states
that CertGuard is childish, rude and most of all not helpful. This is
exactly what we want to say about them in addition to their support of
apparent braindump sites and exploiting this War on Braindumps for a
profit via website advertising. Below is a quote taken from this post.
http://groups.google.ca/group/microsoft.public.cert.exam.mcdst/browse_thread/thread/b913082dda4522e6/a6dd48bde6adf5f1?lnk=gst&q=certguard&rnum=76&hl=en#a6dd48bde6adf5f1
"You are right that many in the MCNGP / CertGuard group are very
childish, rude beyond belief, and in most cases [90% of the time] not
very helpful.
Their insulting of people for no reason who are trying to help people
is truly beyond my comprehension, especially since these are people
who are supposedly knowledgeable enough on computers to know that
UseNet exists (Not everyone does) and hence have some intelligence. So
why did you join them?
I think their group's goals of stamping out proxy-testers and
braindumps is very laudable, but their actions are just like the
outgoing Clinton officials glueing of the "W" keys on government
computers - it doesn't show any intelligence, it just shows how
childish they are and destroys what credibility they did have. This is
a PUBLIC forum - their actions may be fine in their fraternity houses
on their college campuses, but not in the real world. Their response
to you in not acknowledging that this is a problem (but just
criticizing you further) is another sign that they are ignorant and do
not understand or care. Until they change, I will not be joining that
group, which is a shame, since I too agree with cleaning up the
certification mess.
Even the criticism of you putting your "MCP" in your signature is a
sign that some in the group's leadership deep down don't care about
increasing the values of all certifications. They just want to justify
their psychological need of putting people down and somehow believe
that this is a good method of doing so.
I would like to know why you gave them credibility for their actions
by
joining their group. "If you would like to read more about this post,
you can view this by clicking on the link below.
3. Transcender Vs. MeasureUp -> the majority of posts here doesn't
even cover this topic, instead it is filled with childish and useless
posts.
http://groups.google.ca/group/microsoft.public.cert.exam.mcse/browse_thread/thread/898b840717f20934/61957239a6843f67?lnk=gst&q=certguard&rnum=106&hl=en#61957239a6843f67
4. What requirement for MCSE -> First Guy posts about the requirements
for MCSE but no one other than Birol gives a useful reply. Cerebrus
and CertGuard both give useless, insulting replies and also show just
how childish and immoral they are, so how could any moral person trust
what they say without their own research:
You can view this post below:
http://groups.google.ca/group/microsoft.public.cert.exam.mcse/browse_thread/thread/6586f7bd9e0c052/77d52a5acbd78c0d?lnk=gst&q=certguard&rnum=121&hl=en#77d52a5acbd78c0d
I can go on and on but I think I will stop here. Please feel free to
post with regards to this information provided and give your views on
this topic. Once again, this is just my opinion that certguard
actually supports certain websites that provide braindumps and I hope
people don't get fooled by this.
Cheers!!!
- 14
- MFC >> Clipping Regions (Rects)Hi guys,
I'm making a CWnd-derived control, kinda like a CListCtrl, and I'm starting
to get a headache when it comes to partially displayed rows. So I was
thinking, should I just create a rectangular clipping region and let it do
the dirty work ? Will it be a lot slower ?
I made a DrawItem() that has three cases:
1) draw the whole row
2) the top part is clipped off
3) the bottom part is clipped off
And it would be a hell of a lot easier if I just made a clipping rect and
drew the whole row. I guess I can put in the extra effort but what do I gain
? Thanks.
- 15
- Visual Studio C++ >> Scope of using namespaceHi,
The following code compiles with no error on VC7.1, however I am told
that it produces an error in GCC 4.0 and that, according to the standard
it should indeed produce an error that C1 is not accessable from foo().
Could someone with access to VC8.0 check out what the behaviour on this
compiler is?
namespace N1
{
class C1
{
public:
void f1() {}
};
}
namespace N2
{
using namespace N1;
class C2
{
C1 c;
void f2();
};
}
void N2::C2::f2()
{
C1 c;
c.f1();
}
void foo()
{
C1 c;
c.f1();
}
|
| Author |
Message |
Chicagoman442

|
Posted: Mon Jun 18 16:45:14 CDT 2007 |
Top |
VB Scripts >> Adding TCP/IP Printer Ports and Drivers using a login script
I've written a script to automatically add tcp/ip printer ports and drivers
based on the user's subnet. The script works fine as administrator or power
user however it will NOT work properly if the user has standard user rights.
I need some assistance working around this. I realize that I could use WMI
to do impersonation and add these ports and drivers. However, due to the
large size of the script and the fact that changing methodologies to WMI
would add probably 20+ lines of code per printer per function, there are 100+
functions with anywhere from 2-15 printers per branch function, I can't
realistically change. I'm using the prnport.vbs and rundll32 printui.dll
methodoligies to accomplish what I need. I've tried to build runas into the
script even passing credentials automatically and it still doesn't work
right. My inclination is that the rundll32 must run under an explorer
session that has admin or power user rights otherwise it fails with not
enough rights. Below is a sample of the code. Any help you can provide
would be great!
Dim oIP, r
On Error Resume Next
oIP = DefaultGateway
Select Case oIP
Case "10.207.127.1"
Set oShell = WScript.CreateObject("WScript.Shell")
r = oShell.RegRead("HKLM\SOFTWARE\Printers\judesk\Installed")
If r <> 1 Then
AddPrintersjudesk
End If
End Select
Function DefaultGateway()
Dim oDG, oDGs, WMI
Set WMI = GetObject("winmgmts:\\.\root\cimv2")
Set oDGs = WMI.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each oDG in oDGs
If Not IsNull(oDG.DefaultIPGateway) Then
If Not oDG.DefaultIPGateway(0) = "0.0.0.0" Then
DefaultGateway = oDG.DefaultIPGateway(0)
Exit For
End If
End If
Next
End Function
Function AddPrintersJUDesk()
'prndriver1 = """QMS ColorScript Laser 1000"""
'prndriver2 = """Kyocera Mita FS-3700"""
prndriver3 = """IBM InfoPrint 20"""
'prndriver4 = """HP LaserJet 4"""
'prndriver5 = """SHARP AR-M277 PCL5e"""
prndriver6 = """Kyocera FS-5900C (KPDL-2)"""
'prndriver7 = """HP LaserJet 5Si"""
'prndriver8 = """HP LaserJet 4100 PCL 5e"""
oShell.Run "cmd /c cscript c:\windows\system32\prnport.vbs -a -r
IP_172.18.102.10 -h 172.18.102.10 -o raw -n 9100"
oShell.Run "cmd /c rundll32 printui.dll,PrintUIEntry /if /b P6154001 /f
%windir%\inf\ntprint.inf /r IP_172.18.102.10 /m " & prndriver1
oShell.Run "cmd /c cscript c:\windows\system32\prnport.vbs -a -r
IP_172.18.102.11 -h 172.18.102.11 -o raw -n 9100"
oShell.Run "cmd /c rundll32 printui.dll,PrintUIEntry /if /b P6154002 /f
%windir%\inf\ntprint.inf /r IP_172.18.102.11 /m " & prndriver1
oShell.Run "cmd /c cscript c:\windows\system32\prnport.vbs -a -r
IP_172.18.102.14 -h 172.18.102.14 -o raw -n 9100"
oShell.Run "cmd /c rundll32 printui.dll,PrintUIEntry /if /b P6154003 /f
%windir%\inf\ntprint.inf /r IP_172.18.102.14 /m " & prndriver1
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Printers"
strKeyPath2 = "SOFTWARE\Printers\judesk"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath2
strValueName = "Installed"
dwValue = 1
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeypath2,strValueName,dwValue
End Function
Visual Studio96
|
| |
|
| |
 |
ItsMillerTime4u

|
Posted: Mon Jun 18 16:45:14 CDT 2007 |
Top |
VB Scripts >> Adding TCP/IP Printer Ports and Drivers using a login script
In PrimalScript and AdminScriptEditor it allows you to compile the
script code and execute it as a different user. if you don't have
either one of these IDEs then you may want to look at possibly writing
your code in AutoIt and use the RunAsSet command see here:
http://www.autoitscript.com/autoit3/docs/functions/RunAsSet.htm then
you can compile the code in the free AutoIt2Exe which is included in
the AutoIt v3 Download.
|
| |
|
| |
 |
billy

|
Posted: Tue Jun 19 23:01:17 CDT 2007 |
Top |
VB Scripts >> Adding TCP/IP Printer Ports and Drivers using a login script
On Jun 15, 2:40 pm, Johnathan <EMail@HideDomain.com>
wrote:
> I've written a script to automatically add tcp/ip printer ports and drivers
> based on the user's subnet. The script works fine as administrator or power
> user however it will NOT work properly if the user has standard user rights.
> I need some assistance working around this. I realize that I could use WMI
> to do impersonation and add these ports and drivers. However, due to the
> large size of the script and the fact that changing methodologies to WMI
> would add probably 20+ lines of code per printer per function, there are 100+
> functions with anywhere from 2-15 printers per branch function, I can't
> realistically change. I'm using the prnport.vbs and rundll32 printui.dll
> methodoligies to accomplish what I need. I've tried to build runas into the
> script even passing credentials automatically and it still doesn't work
> right. My inclination is that the rundll32 must run under an explorer
> session that has admin or power user rights otherwise it fails with not
> enough rights. Below is a sample of the code. Any help you can provide
> would be great!
>
> Dim oIP, r
> On Error Resume Next
> oIP = DefaultGateway
> Select Case oIP
> Case "10.207.127.1"
> Set oShell = WScript.CreateObject("WScript.Shell")
> r = oShell.RegRead("HKLM\SOFTWARE\Printers\judesk\Installed")
> If r <> 1 Then
> AddPrintersjudesk
> End If
>
> End Select
>
> Function DefaultGateway()
> Dim oDG, oDGs, WMI
> Set WMI = GetObject("winmgmts:\\.\root\cimv2")
> Set oDGs = WMI.ExecQuery _
> ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
> For Each oDG in oDGs
> If Not IsNull(oDG.DefaultIPGateway) Then
> If Not oDG.DefaultIPGateway(0) = "0.0.0.0" Then
> DefaultGateway = oDG.DefaultIPGateway(0)
> Exit For
> End If
> End If
> Next
> End Function
>
> Function AddPrintersJUDesk()
> 'prndriver1 = """QMS ColorScript Laser 1000"""
> 'prndriver2 = """Kyocera Mita FS-3700"""
> prndriver3 = """IBM InfoPrint 20"""
> 'prndriver4 = """HP LaserJet 4"""
> 'prndriver5 = """SHARP AR-M277 PCL5e"""
> prndriver6 = """Kyocera FS-5900C (KPDL-2)"""
> 'prndriver7 = """HP LaserJet 5Si"""
> 'prndriver8 = """HP LaserJet 4100 PCL 5e"""
> oShell.Run "cmd /c cscript c:\windows\system32\prnport.vbs -a -r
> IP_172.18.102.10 -h 172.18.102.10 -o raw -n 9100"
> oShell.Run "cmd /c rundll32 printui.dll,PrintUIEntry /if /b P6154001 /f
> %windir%\inf\ntprint.inf /r IP_172.18.102.10 /m " & prndriver1
> oShell.Run "cmd /c cscript c:\windows\system32\prnport.vbs -a -r
> IP_172.18.102.11 -h 172.18.102.11 -o raw -n 9100"
> oShell.Run "cmd /c rundll32 printui.dll,PrintUIEntry /if /b P6154002 /f
> %windir%\inf\ntprint.inf /r IP_172.18.102.11 /m " & prndriver1
> oShell.Run "cmd /c cscript c:\windows\system32\prnport.vbs -a -r
> IP_172.18.102.14 -h 172.18.102.14 -o raw -n 9100"
> oShell.Run "cmd /c rundll32 printui.dll,PrintUIEntry /if /b P6154003 /f
> %windir%\inf\ntprint.inf /r IP_172.18.102.14 /m " & prndriver1
> const HKEY_LOCAL_MACHINE = &H80000002
> strComputer = "."
> Set StdOut = WScript.StdOut
>
> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
> strComputer & "\root\default:StdRegProv")
>
> strKeyPath = "SOFTWARE\Printers"
> strKeyPath2 = "SOFTWARE\Printers\judesk"
> oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
> oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath2
> strValueName = "Installed"
> dwValue = 1
> oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeypath2,strValueName,dwValue
>
> End Function
you could run the script as a startup script (as opposed to a logon
script). startup scripts run as "system" so the script would have no
problem writing to HKLM (lowly users can't do this - which is why your
script fails).
or, you could set up a print server (MS recommends this). users can
add printers published on print servers without the security problems.
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ VB Scripts |
- Next
- 1
- 2
- MFC >> Resource leakThis is a multi-part message in MIME format.
------=_NextPart_000_0022_01C39EFE.09B31940
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
What is wrong with this code?
CodeSnitch of Entrek (utility that allows profiling WinCE) emphasise the =
red line as a resourse leak.=20
Assuming that in my test application there is no use of the m_Brush, =
this leak is really weird.
Somebody can explane it?
CPOEApp::CPOEApp(LPCTSTR lpszAppName): CWinApp(lpszAppName)
{
m_Brush.CreateSolidBrush(TOP_LABEL_COLOR); //resource leak
}
CPOEApp::~CPOEApp()
{
m_Brush.DeleteObject();
}
Stas K
------=_NextPart_000_0022_01C39EFE.09B31940
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY dir=3Dltr>
<DIV>
<P><FONT face=3DArial size=3D2>What is wrong with this code?</FONT></P>
<P><FONT face=3DArial size=3D2>CodeSnitch of Entrek (utility that allows =
profiling=20
WinCE) emphasise the red line as a resourse leak. </FONT></P>
<P><FONT face=3DArial size=3D2>Assuming that in my test application =
there is no use=20
of the m_Brush, this leak is really weird.</FONT></P>
<P><FONT face=3DArial size=3D2>Somebody can explane it?</FONT></P>
<P><FONT face=3DArial size=3D2>CPOEApp::CPOEApp(LPCTSTR lpszAppName):=20
CWinApp(lpszAppName)</FONT></P>
<P><FONT face=3DArial size=3D2>{</FONT></P>
<P><FONT face=3DArial size=3D2> <FONT=20
color=3D#ff0000><STRONG>m_Brush.CreateSolidBrush(TOP_LABEL_COLOR); =
//resource=20
leak</STRONG></FONT></FONT></P>
<P><FONT face=3DArial size=3D2>}</FONT></P>
<P><FONT face=3DArial size=3D2>CPOEApp::~CPOEApp()</FONT></P>
<P><FONT face=3DArial size=3D2>{</FONT></P>
<P><FONT face=3DArial size=3D2> =
m_Brush.DeleteObject();</FONT></P>
<P><FONT face=3DArial size=3D2>}</FONT></P>
<P><FONT face=3DArial size=3D2>Stas K</FONT></P></DIV></BODY></HTML>
------=_NextPart_000_0022_01C39EFE.09B31940--
- 3
- Visual Basic [VB] >> Need a palette expert hereBelow is a small but complete program that appears to show you
can't retrive a Palette from the clipboard.
This is true whether the palette is placed on the clipboard by Photoshop or
Photoshop or by the below program
It lets you place a palette from a file or from a program on the clipboard
and allows you to retrieve one from the clipboard. But you'll find the
retrieved one is always "Nothing"
I'd appreciate comments
Imports System.Drawing.Imaging
Public Class Form1
Inherits System.Windows.Forms.Form
Private WithEvents button1 As System.Windows.Forms.Button
Private WithEvents button2 As System.Windows.Forms.Button
Private WithEvents button3 As System.Windows.Forms.Button
Private components As System.ComponentModel.IContainer
Private cp As ColorPalette
Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Public Sub New()
InitializeComponent()
End Sub 'New
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub 'Dispose
#Region "Windows Form Designer generated code"
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.button1 = New System.Windows.Forms.Button
Me.button2 = New System.Windows.Forms.Button
Me.button3 = New System.Windows.Forms.Button
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout()
'
'button1
'
Me.button1.Location = New System.Drawing.Point(186, 124)
Me.button1.Name = "button1"
Me.button1.Size = New System.Drawing.Size(130, 24)
Me.button1.TabIndex = 2
Me.button1.Text = "Copy File Palette"
Me.ToolTip1.SetToolTip(Me.button1, "Copy Palette from a GIF file to the
clipboard")
'
'button2
'
Me.button2.Location = New System.Drawing.Point(13, 124)
Me.button2.Name = "button2"
Me.button2.Size = New System.Drawing.Size(156, 24)
Me.button2.TabIndex = 2
Me.button2.Text = "Retrieve Clipboard Palette"
Me.ToolTip1.SetToolTip(Me.button2, "Retrieve a palette from the clipboard")
'
'button3
'
Me.button3.Location = New System.Drawing.Point(88, 167)
Me.button3.Name = "button3"
Me.button3.Size = New System.Drawing.Size(130, 24)
Me.button3.TabIndex = 2
Me.button3.Text = "Exit"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(12, 24)
Me.TextBox1.Multiline = True
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(304, 47)
Me.TextBox1.TabIndex = 3
Me.TextBox1.Text = "Palette can be placed on clipboard by using the 'Save
Palette"" button or by some " & _
"external program such as Photoshop"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(13, 85)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(302, 20)
Me.TextBox2.TabIndex = 4
'
'Timer1
'
Me.Timer1.Enabled = True
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(328, 204)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.button1)
Me.Controls.Add(Me.button2)
Me.Controls.Add(Me.button3)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub 'InitializeComponent
#End Region
<STAThread()> Shared Sub Main()
Application.Run(New Form1)
End Sub 'Main
Private Sub button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles button1.Click
Dim dlg As New OpenFileDialog
dlg.Filter = "GIF files|*.GIF"
If dlg.ShowDialog() = DialogResult.OK Then
Dim zz As Image = Image.FromFile(dlg.FileName)
Dim DataO As New DataObject
DataO.SetData(DataFormats.Bitmap, False, CType(zz, Bitmap))
DataO.SetData(DataFormats.Palette.ToString, False, zz.Palette)
Clipboard.SetDataObject(DataO, False)
End If
End Sub 'button1_Click
Private Sub button2_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles button2.Click
Dim DataO As DataObject = CType(Clipboard.GetDataObject(), DataObject)
If DataO.GetDataPresent(DataFormats.Palette, False) Then
cp = CType(DataO.GetData(DataFormats.Palette), ColorPalette)
If cp Is Nothing Then
MessageBox.Show("Contains palette that is Nothing")
Else
MessageBox.Show(cp.ToString)
End If
Else
MessageBox.Show("No Palette on Clipboard")
End If
End Sub 'button2_Click
Private Sub button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles button3.Click
Application.Exit()
End Sub 'button3_Click
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Timer1.Tick
Dim DataO As DataObject = CType(Clipboard.GetDataObject(), DataObject)
If DataO.GetDataPresent(DataFormats.Palette, False) Then
Dim cp As ColorPalette = CType(DataO.GetData(DataFormats.Palette),
ColorPalette)
TextBox2.Text = "There is a Palette on the Clipboard"
Else
TextBox2.Text = "The Clipboard does not contain a Palette"
End If
End Sub
End Class 'Form1
- 4
- Visual Basic [VB] >> Trying to create a copy of a .NET dllHello,
I'm trying to make a copy of a .NET dll for testing purposes.
I've changed the target of my dll from MyDLL.dll to MyDLLTest.dll. In
the AssemblyInfo.vb, I've changed the from:
<Assembly: AssemblyDescription("My DLL")>
to:
<Assembly: AssemblyDescription("My DLL Test")>
I've then copied the MyDLLTest.dll to the same directory as a VB6 test
harness that I've built and run regasm MyDLLTest.dll /tlb:MyDLLTest.tlb
to create
the type library.
Next, I go to add a reference in my VB6 test harness
and browse to the .tlb file that's in the same directory. I click add
and in the references in my VB6 project I see "My DLL" instead of "My
DLL Test".
Please note that the MyDLL.dll that I'm basing the
MyDLLTest.dll from is registered in COM+. I'm wondering if I need to
change the guid in the AssemblyInfo.vb in order to get "My DLL Test" to
show up in the references description in my VB6 project. I've added
some additional debugging information to to MyDLLTest.dll that's not in
MyDLL.dll.
I want to be able to move this VB6 exe together with MyDLLTest.dll to
another machine that also has MyDLL.dll registered in COM+. I'm
figuring that this way I can see what's going on in MyDLL.dll without
disturbing the existing MyDLL.dll that's registered in COM+.
Thanks,
Eric
- 5
- MFC >> ModifyMenuI want to modify the menus, if the user has selected a new languages.
With the Popup- menus in the menu-bar I can do this with
ModifyMenu(..,<level>,MF_BY_POSITION,<level>,<new string>).
In the submenus I can do this with
ModifyMenu(..,<id>,MF_BY_COMMAND,<id>,<new string>).
All this works fine. Sometimes I have also a POPUP for a submenu
within a submenu. In this case a have no identifier, which
with I can change the text. And I cannot use the "MF_BY_POSITION", because
this
works only for menus, but not for submenus.
Who can help me?
Andreas
- 6
- MFC >> resource-only DLL and LNK2019 error!!Hi,
i'm developing a resource-only DLL, using /NOENTRY option the linker returns:
error LNK2019: unresolved external symbol _main referenced in function
_mainCRTStartup
Any help!?
Thanks
Ale
- 7
- VB Scripts >> help neededIm writing an bat file to rename an file with a new name, and i need to
get the ERRORLEVEL value from this bat file into an VBScript.
I m always getting an zero errorlevel when i run the bat file from the
script
My code is below...
BAT FILE
---------------------------------
@echo off
:: do something that sets errorlevel 1
REN fil fils
echo %ERRORLEVEL%
(this would return an 1 when run from dos prompt)
VBScript
-------------------------------------
Dim fso, wShell, i
Set wShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
i = wShell.Run ("C:\test1.bat", 1, True)
WScript.Echo i
(This should return 1, but returns only 0)
Y is this happening, is there anything wrong with my logic
Rajesh.N
- 8
- Visual Basic [VB] >> A value copy, not reference, of SqlParameter?' Declare a new parameter object
Dim param() As SqlParameter = New SqlParameter(0) {}
' Set this to null and make it an InputOutput parameter
param(0) = New SqlParameter("@Something, DBNull.Value) ' Can also be
non-null, but sometimes is null
param(0).Direction = ParameterDirection.InputOutput
' But, before we begin, store a copy of the existing parameters into another
variable
Dim param2() As SqlParameter = New SqlParameter(0) {}
param2 = param
' Run the stored proc. The stored proc has an OUTPUT parameter which will
return a value to the caller
SqlHelper.ExecuteNonQuery("ConnStr", CommandType.StoredProcedure,
"dbo.MyStoredProc, param)
WHERE
MyStoredProc's @Something parameter is an OUTPUT parameter, and after the
stored proc is finished running, BOTH SqlParameters have the same value.
It looks like "param2 = param" is a reference copy. How can I copy by value
only so that, when the Output argument returns a value to the first
parameter, param2 does NOT have the same value. I want a value copy, not a
reference copy. How do I do that?
- 9
- MFC >> strange issue with drag and drop target windowhi there
i am implementing drag n drop in my app using the COleDataSource/
COleDropSource/COleDropTarget classes
everything is going well, but there is one strange thing going on
one of my target windows is a plain ole CWnd-derived window, which has
some child buttons created on it dynamically - i register a
COleDropTarget object for the CWnd-derived parent window, but *not*
for any of the child button windows
when i try to drag onto this window, the COleDropTarget instance that
was registered for the window only gets its OnDragEnter/OnDragOver/
OnDragLeave/OnDrop methods called when the mouse is over one of the
*child* buttons, and never when it is moving over open space within
the window
i check window handles in the COleDropTarget handlers, and the window
passed to these methods has the same handle as my main CWnd-derived
window, *not* the handle of the child button, so that makes sense
also, when i create *no* child buttons on the CWnd-derived window, the
drop handlers don;t get called *at all*
so why oh why shouldn't the COleDropTarget object be called when the
cursor is *anywhere* the registred window?
its driving me nuts
any help will be greatly appreciated
regards
bhu
- 10
- Visual Basic >> Program Version NumberIn Project Properties in Version Number I see: Major 12, Minor 1, Revision
10.
When I compile my project and via EXE's properties I see Version 12.1.0.10
Where 0 does come from?
Is there any place in VB environment to control that third place in version
number? Now it's always 0.
Thank you
vovan
- 11
- VB Scripts >> InternalNameDoes anyone know how I could echo back a internal name of an dll or exe
file? I found this link:
http://www.nedcomp.nl/support/origdocs/dotnetsdk/cpref/frlrfsystemdiagnosticsfileversioninfoclassinternalnametopic.htm
, but its for Visual Basic, C#, JScript only, and I can't figure out
how I would do it in vbscript.
- 12
- Visual Basic [VB] >> Dynamically adding and iterating through webcontrolsHi everyone,
I created a page which contains a two-column table. The first column has a
bunch of labels, and the second a bunch of textboxes. Here's the code:
======================================================
Protected WithEvents Container As System.Web.UI.WebControls.PlaceHolder
Private Sub ConstructEditTable()
Container.Controls.Add(New LiteralControl("<table>" & vbNewLine))
Dim i As Integer
For i = 0 To rows
With Container.Controls
.Add(New LiteralControl("<tr>" & vbNewLine))
'Label column
.Add(New LiteralControl("<td>" & vbNewLine))
label = New Label
label.ID = "lbl" & i.ToString
label.Text = i.ToString
label.EnableViewState = True
.Add(label)
.Add(New LiteralControl("</td>" & vbNewLine))
'Textbox column
.Add(New LiteralControl("<td>" & vbNewLine))
txtTest = New TextBox
txtTest.ID = "txt" & i.ToString
txtTest.Width = Unit.Pixel(50)
txtTest.EnableViewState = True
.Add(txtTest)
.Add(New LiteralControl("</td>" & vbNewLine))
.Add(New LiteralControl("</tr>" & vbNewLine))
End With
Next
Container.Controls.Add(New LiteralControl("</table>" & vbNewLine))
End Sub
==========================================================
The problem I have is accessing the content of the textboxes after postback.
How do I iterate through the controls in Container? Basically, after
PostBack, I would like to display the same table but with labels in the
second column, instead of textboxes. These labels would display the content
of the textboxes entered prior to PostBack.
Any ideas anyone? Any suggestions would be greatly appreciated.
Cheers,
Dany.
- 13
- Visual Basic >> Error while opening a recordsetHi,
I am getting error "Multiple step OLE DB operation generatied errors. Check
each status value" while opening a recordset with records of nearly 4300000.
The records are unique in the table.
I am using the below coding to open the recordset.
With Recordset
.CursorLocation = adUseServer
.Open SQL, Cn, adOpenKeyset, adLockReadOnly
End With
Please can any one help me in finding what's the issue that causes the
error.
Thanks
Valli
- 14
- 15
- Visual Basic [VB] >> Run a sub from within a tread?I'm a newbie to threads. I can run
"comboProfiles_SelectedIndexChanged(sender, e)" from any normal sub in my
project however if I run this from within a new thread I've started it
doesn't like "sender" or "e". I know sending info from within a thread is
different but what I'm doing should be simple so if someone can help me out
I sure would appreciate it.
Thanks Much,
Justin
|
|
|