Click here to Skip to main content
14,659,323 members
Home » Discussions » Visual Basic
   

Visual Basic

 
QuestionSQL error on bound datagridviews (master detail) Pin
roa20111-Jun-20 6:18
Memberroa20111-Jun-20 6:18 
AnswerRe: SQL error on bound datagridviews (master detail) Pin
Richard Deeming1-Jun-20 7:48
mveRichard Deeming1-Jun-20 7:48 
GeneralRe: SQL error on bound datagridviews (master detail) Pin
roa20112-Jun-20 0:53
Memberroa20112-Jun-20 0:53 
Questionexcel vba combobox and checkbox elements resizing Pin
Mat 25728-May-20 3:14
MemberMat 25728-May-20 3:14 
Questioni want to take average of it of one min. i have tried this code but no result found. please help Pin
Tommy Jo21-May-20 5:23
MemberTommy Jo21-May-20 5:23 
AnswerRe: i want to take average of it of one min. i have tried this code but no result found. please help Pin
Richard MacCutchan21-May-20 5:42
mveRichard MacCutchan21-May-20 5:42 
AnswerRe: i want to take average of it of one min. i have tried this code but no result found. please help Pin
ZurdoDev21-May-20 6:03
mveZurdoDev21-May-20 6:03 
QuestionHow to call a function as a callback parameter Pin
chug100818-May-20 8:58
Memberchug100818-May-20 8:58 
I'm trying to convert some c# code that makes an API function call that has a parameter to a callback. I get a compiler error regarding the "Log" parameter in the call in the frmMain_Load function. How do I define things so that I satisfy the call to this function. Any help is greatly appreciated.

The c# code I'm trying to convert is:

public static IPublicClientApplication PublicClientApp { get; private set; }

 static App()
 {
     PublicClientApp = PublicClientApplicationBuilder.Create(ClientId)
         .WithB2CAuthority(AuthoritySignUpSignIn)
         .WithLogging(Log, LogLevel.Verbose, false) //PiiEnabled set to false
         .Build();
 }
 private static void Log(LogLevel level, string message, bool containsPii)
 {
     string logs = ($"{level} {message}");
     StringBuilder sb = new StringBuilder();
     sb.Append(logs);
     File.AppendAllText(System.Reflection.Assembly.GetExecutingAssembly().Location + ".msalLogs.txt", sb.ToString());
     sb.Clear();
 }


I've converted the code as follows:

Private Async Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load

      PublicClientApp = PublicClientApplicationBuilder.Create(ClientId).WithB2CAuthority(AuthoritySignUpSignIn).WithLogging(Log, LogLevel.Verbose, False).Build

  End Sub


Function Log(ByVal level As LogLevel, Message As String, ByVal containsPii As Boolean)
       Dim logs As String = ($"{level} {Message}")
       Dim sb As StringBuilder = New StringBuilder()
       sb.Append(logs)
       File.AppendAllText(System.Reflection.Assembly.GetExecutingAssembly().Location & ".msalLogs.txt", sb.ToString())
       sb.Clear()
   End Function

AnswerRe: How to call a function as a callback parameter Pin
Richard Deeming18-May-20 23:56
mveRichard Deeming18-May-20 23:56 
GeneralRe: How to call a function as a callback parameter Pin
chug100820-May-20 9:29
Memberchug100820-May-20 9:29 
QuestionCrystal Report SetDataSource Issue Pin
GeorgeChu15-May-20 6:03
MemberGeorgeChu15-May-20 6:03 
AnswerRe: Crystal Report SetDataSource Issue Pin
Eddy Vluggen15-May-20 7:38
professionalEddy Vluggen15-May-20 7:38 
QuestionMake a simple pattern/shape Pin
M.S.S.E10-May-20 19:21
MemberM.S.S.E10-May-20 19:21 
AnswerRe: Make a simple pattern/shape Pin
Member 798912210-May-20 20:59
MemberMember 798912210-May-20 20:59 
Questiondesktop/screen streaming to youtube/twitch by stream key or IP in visual basic.net Pin
sharath Nandakumar9-May-20 0:21
Membersharath Nandakumar9-May-20 0:21 
AnswerRe: desktop/screen streaming to youtube/twitch by stream key or IP in visual basic.net Pin
Richard MacCutchan9-May-20 1:22
mveRichard MacCutchan9-May-20 1:22 
GeneralRe: desktop/screen streaming to youtube/twitch by stream key or IP in visual basic.net Pin
sharath Nandakumar9-May-20 7:11
Membersharath Nandakumar9-May-20 7:11 
GeneralRe: desktop/screen streaming to youtube/twitch by stream key or IP in visual basic.net Pin
Richard MacCutchan9-May-20 21:23
mveRichard MacCutchan9-May-20 21:23 
QuestionFill Data of Parents and multi levels of Child tables only Pin
EngrImad2-May-20 13:53
MemberEngrImad2-May-20 13:53 
AnswerRe: Fill Data of Parents and multi levels of Child tables only Pin
Eddy Vluggen2-May-20 21:41
professionalEddy Vluggen2-May-20 21:41 
AnswerRe: Fill Data of Parents and multi levels of Child tables only Pin
evry1falls4-May-20 14:41
Memberevry1falls4-May-20 14:41 
QuestionVB.NET Pin
Babayomi28-Apr-20 12:07
MemberBabayomi28-Apr-20 12:07 
GeneralRe: VB.NET Pin
Ralf Meier28-Apr-20 20:01
professionalRalf Meier28-Apr-20 20:01 
AnswerRe: VB.NET Pin
Richard MacCutchan28-Apr-20 21:44
mveRichard MacCutchan28-Apr-20 21:44 
QuestionCompare File Date Created Date Modified in VBA ( Allow Download time 20 mintes Buffer Time) Pin
Member 1478441625-Apr-20 3:27
MemberMember 1478441625-Apr-20 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.